X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRules.lhs;h=c7e951f343fa17a9d0e3de1bc9ae6fb87a9f2fca;hp=b14c2c94499f7feef61035c2168846aa47d04352;hb=afef39736dcde6f4947a6f362f9e6b3586933db4;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1 diff --git a/compiler/typecheck/TcRules.lhs b/compiler/typecheck/TcRules.lhs index b14c2c9..c7e951f 100644 --- a/compiler/typecheck/TcRules.lhs +++ b/compiler/typecheck/TcRules.lhs @@ -10,7 +10,7 @@ module TcRules ( tcRules ) where import HsSyn ( RuleDecl(..), LRuleDecl, RuleBndr(..), mkHsDictLet ) import TcRnMonad -import TcSimplify ( tcSimplifyToDicts, tcSimplifyInferCheck ) +import TcSimplify ( tcSimplifyRuleLhs, tcSimplifyInferCheck ) import TcMType ( newFlexiTyVarTy, zonkQuantifiedTyVar, tcSkolSigTyVars ) import TcType ( tyVarsOfTypes, openTypeKind, SkolemInfo(..), substTyWith, mkTyVarTys ) import TcHsType ( UserTypeCtxt(..), tcHsPatSigType ) @@ -43,7 +43,7 @@ tcRule (HsRule name act vars lhs fv_lhs rhs fv_rhs) ) `thenM` \ (ids, lhs', rhs', lhs_lie, rhs_lie) -> -- Check that LHS has no overloading at all - getLIE (tcSimplifyToDicts lhs_lie) `thenM` \ (lhs_binds, lhs_dicts) -> + tcSimplifyRuleLhs lhs_lie `thenM` \ (lhs_dicts, lhs_binds) -> -- Gather the template variables and tyvars let @@ -86,7 +86,7 @@ tcRule (HsRule name act vars lhs fv_lhs rhs fv_rhs) (map (RuleBndr . noLoc) (forall_tvs2 ++ tpl_ids)) -- yuk (mkHsDictLet lhs_binds lhs') fv_lhs (mkHsDictLet rhs_binds rhs') fv_rhs) - where + tcRuleBndrs [] thing_inside = thing_inside [] tcRuleBndrs (RuleBndr var : vars) thing_inside