X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnBinds.lhs;h=a96c63f63982bff7156c05170baad9ee45a8fcd7;hp=59c5959f942731334018d0efc456e4a1921c9588;hb=b88025eabcd83f65d1d81f09272f5172f06a60e7;hpb=1dfd77341ec56e9d61f2d78cb7ff2b9900385dac diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs index 59c5959..a96c63f 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, fun_tick = Nothing }), [plain_name], fvs) } \end{code} @@ -444,8 +445,11 @@ rnMethodBind cls sig_fn gen_tyvars (L loc (FunBind { fun_id = name, fun_infix = new_group = MatchGroup new_matches placeHolderType 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 })), + returnM (unitBag (L loc (FunBind { + fun_id = sel_name, fun_infix = inf, + fun_matches = new_group, + bind_fvs = fvs, fun_co_fn = idHsWrapper, + fun_tick = Nothing })), fvs `addOneFV` plain_name) -- The 'fvs' field isn't used for method binds where @@ -468,6 +472,7 @@ rnMethodBind cls sig_fn gen_tyvars mbind@(L loc (PatBind other_pat _ _ _)) \end{code} + %************************************************************************ %* * \subsubsection[dep-Sigs]{Signatures (and user-pragmas for values)}