X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FInst.lhs;h=225d2f36ed79c9f11b5f34b2f6ddeeccc653bdd6;hb=9a47b3820b1cb381ce1dc94fe25fac600c4d10a5;hp=c1801d6d4dff862913af4b40c52e48a31b4440ae;hpb=d2ce0f52d42edf32bb9f13796e6ba6edba8bd516;p=ghc-hetmet.git diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index c1801d6..225d2f3 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -37,7 +37,6 @@ import HsSyn import TcHsSyn import TcRnMonad import TcEnv -import TcRnTypes import InstEnv import FunDeps import TcMType @@ -143,7 +142,7 @@ deeplySkolemise deeplySkolemise skol_info ty | Just (arg_tys, tvs, theta, ty') <- tcDeepSplitSigmaTy_maybe ty - = do { ids1 <- newSysLocalIds (fsLit "dsk") arg_tys + = do { ids1 <- newSysLocalIds (fsLit "dk") arg_tys ; tvs1 <- mapM (tcInstSkolTyVar skol_info) tvs ; let subst = zipTopTvSubst tvs (mkTyVarTys tvs1) ; ev_vars1 <- newEvVars (substTheta subst theta) @@ -170,14 +169,14 @@ deeplyInstantiate :: CtOrigin -> TcSigmaType -> TcM (HsWrapper, TcRhoType) deeplyInstantiate orig ty | Just (arg_tys, tvs, theta, rho) <- tcDeepSplitSigmaTy_maybe ty = do { (_, tys, subst) <- tcInstTyVars tvs - ; ids1 <- newSysLocalIds (fsLit "dsk") (substTys subst arg_tys) + ; ids1 <- newSysLocalIds (fsLit "di") (substTys subst arg_tys) ; wrap1 <- instCall orig tys (substTheta subst theta) - ; (wrap2, rho) <- deeplyInstantiate orig (substTy subst rho) + ; (wrap2, rho2) <- deeplyInstantiate orig (substTy subst rho) ; return (mkWpLams ids1 + <.> wrap2 <.> wrap1 - <.> mkWpEvVarApps ids1 - <.> wrap2, - mkFunTys arg_tys rho) } + <.> mkWpEvVarApps ids1, + mkFunTys arg_tys rho2) } | otherwise = return (idHsWrapper, ty) \end{code} @@ -372,8 +371,8 @@ syntaxNameCtxt name orig ty tidy_env = do getOverlapFlag :: TcM OverlapFlag getOverlapFlag = do { dflags <- getDOpts - ; let overlap_ok = dopt Opt_OverlappingInstances dflags - incoherent_ok = dopt Opt_IncoherentInstances dflags + ; let overlap_ok = xopt Opt_OverlappingInstances dflags + incoherent_ok = xopt Opt_IncoherentInstances dflags overlap_flag | incoherent_ok = Incoherent | overlap_ok = OverlapOk | otherwise = NoOverlap