X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnBinds.lhs;h=ecd3b3d04a239fffdbbe8466912c42760ffde370;hp=713fe009cc936a4eaf244f0d76fc8af7d1c7d4eb;hb=9da4639011348fb6c318e3cba4b08622f811d9c4;hpb=afef39736dcde6f4947a6f362f9e6b3586933db4 diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs index 713fe00..ecd3b3d 100644 --- a/compiler/rename/RnBinds.lhs +++ b/compiler/rename/RnBinds.lhs @@ -379,8 +379,8 @@ rnBind sig_fn trim (L loc (PatBind { pat_lhs = pat, pat_rhs = grhss })) ; let bndrs = collectPatBinders pat' - ; (grhss', fvs) <- bindSigTyVarsFV (concatMap sig_fn bndrs) $ - rnGRHSs PatBindRhs grhss + ; (grhss', fvs) <- rnGRHSs PatBindRhs grhss + -- No scoped type variables for pattern bindings ; return (L loc (PatBind { pat_lhs = pat', pat_rhs = grhss', pat_rhs_ty = placeHolderType, bind_fvs = trim fvs }), @@ -392,12 +392,13 @@ rnBind sig_fn trim (L loc (FunBind { fun_id = name, fun_infix = inf, fun_matches ; let plain_name = unLoc new_name ; (matches', fvs) <- bindSigTyVarsFV (sig_fn plain_name) $ + -- bindSigTyVars tests for Opt_ScopedTyVars rnMatchGroup (FunRhs plain_name) matches ; checkPrecMatch inf plain_name matches' ; return (L loc (FunBind { fun_id = new_name, fun_infix = inf, fun_matches = matches', - bind_fvs = trim fvs, fun_co_fn = idCoercion }), + bind_fvs = trim fvs, fun_co_fn = idHsWrapper }), [plain_name], fvs) } \end{code} @@ -445,7 +446,7 @@ rnMethodBind cls sig_fn gen_tyvars (L loc (FunBind { fun_id = name, fun_infix = in checkPrecMatch inf plain_name new_group `thenM_` returnM (unitBag (L loc (FunBind { fun_id = sel_name, fun_infix = inf, fun_matches = new_group, - bind_fvs = fvs, fun_co_fn = idCoercion })), + bind_fvs = fvs, fun_co_fn = idHsWrapper })), fvs `addOneFV` plain_name) -- The 'fvs' field isn't used for method binds where