X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcHsSyn.lhs;h=6389f34aef514141f3ed2cd107bb75e802807779;hb=f85903abe9103e545ea5b1dc6fdd6b672da4f3f2;hp=c938a7638ff6446f416fee47ffbd4f72dcaada01;hpb=5d3051c66796dcf884b052f9e4afc3ed19b9f514;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcHsSyn.lhs b/ghc/compiler/typecheck/TcHsSyn.lhs index c938a76..6389f34 100644 --- a/ghc/compiler/typecheck/TcHsSyn.lhs +++ b/ghc/compiler/typecheck/TcHsSyn.lhs @@ -72,7 +72,7 @@ mkVanillaTuplePat pats box = TuplePat pats box (mkTupleTy box (length pats) (map hsPatType pats)) hsPatType :: OutPat Id -> Type -hsPatType pat = pat_type (unLoc pat) +hsPatType (L _ pat) = pat_type pat pat_type (ParPat pat) = hsPatType pat pat_type (WildPat ty) = ty @@ -822,7 +822,7 @@ zonkRules :: ZonkEnv -> [LRuleDecl TcId] -> TcM [LRuleDecl Id] zonkRules env rs = mappM (wrapLocM (zonkRule env)) rs zonkRule :: ZonkEnv -> RuleDecl TcId -> TcM (RuleDecl Id) -zonkRule env (HsRule name act (vars::[RuleBndr TcId]) lhs rhs) +zonkRule env (HsRule name act (vars::[RuleBndr TcId]) lhs fv_lhs rhs fv_rhs) = mappM zonk_bndr vars `thenM` \ new_bndrs -> newMutVar emptyVarSet `thenM` \ unbound_tv_set -> let @@ -858,7 +858,7 @@ zonkRule env (HsRule name act (vars::[RuleBndr TcId]) lhs rhs) final_bndrs :: [Located Var] final_bndrs = map noLoc (varSetElems unbound_tvs) ++ new_bndrs in - returnM (HsRule name act (map RuleBndr final_bndrs) new_lhs new_rhs) + returnM (HsRule name act (map RuleBndr final_bndrs) new_lhs fv_lhs new_rhs fv_rhs) -- I hate this map RuleBndr stuff where zonk_bndr (RuleBndr v)