- -- We do inference on rhs, so that information about its type can be refined
- -- when type-checking the pattern.
-
- -- Deal with rebindable syntax; (>>=) :: rhs_ty -> (a -> res_ty) -> res_ty
- ; (bind_op', pat_ty) <-
+ -- We do inference on rhs, so that information about its type
+ -- can be refined when type-checking the pattern.
+
+ -- Deal with rebindable syntax:
+ -- (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty
+ -- This level of generality is needed for using do-notation
+ -- in full generality; see Trac #1537
+ ; ((bind_op', new_res_ty), pat_ty) <-