X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FInst.lhs;h=e1f3fb77940b1df7bec85b33abee48174065126d;hb=ef6d82a4e1d4ba4884c322be85cff291e017f0e6;hp=225d2f36ed79c9f11b5f34b2f6ddeeccc653bdd6;hpb=201145f80c2c797badceabd0287cc7f5e98302aa;p=ghc-hetmet.git diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index 225d2f3..e1f3fb7 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -88,7 +88,7 @@ newMethodFromName :: CtOrigin -> Name -> TcRhoType -> TcM (HsExpr TcId) newMethodFromName origin name inst_ty = do { id <- tcLookupId name -- Use tcLookupId not tcLookupGlobalId; the method is almost - -- always a class op, but with -XNoImplicitPrelude GHC is + -- always a class op, but with -XRebindableSyntax GHC is -- meant to find whatever thing is in scope, and that may -- be an ordinary function. @@ -294,7 +294,7 @@ mkOverLit (HsIsString s) = return (HsString s) %* * %************************************************************************ -Suppose we are doing the -XNoImplicitPrelude thing, and we encounter +Suppose we are doing the -XRebindableSyntax thing, and we encounter a do-expression. We have to find (>>) in the current environment, which is done by the rename. Then we have to check that it has the same type as Control.Monad.(>>). Or, more precisely, a compatible type. One 'customer' had @@ -473,11 +473,9 @@ hasEqualities :: [EvVar] -> Bool -- Has a bunch of canonical constraints (all givens) got any equalities in it? hasEqualities givens = any (has_eq . evVarPred) givens where - has_eq (EqPred {}) = True - has_eq (IParam {}) = False - has_eq (ClassP cls tys) = any has_eq (substTheta subst (classSCTheta cls)) - where - subst = zipOpenTvSubst (classTyVars cls) tys + has_eq (EqPred {}) = True + has_eq (IParam {}) = False + has_eq (ClassP cls _tys) = any has_eq (classSCTheta cls) ---------------- tyVarsOfWanteds :: WantedConstraints -> TyVarSet