X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcSimplify.lhs;h=48258ed011b20c401c817266533d7233224900ae;hb=67ed735fab12c12a1d48878d7bda33588c67fb78;hp=57e91251d284d54d06cc64e5c7b6f1dc7fe3ab0c;hpb=b3e722e9ff0aeedceeeeacc67d61e11a5ee5b92a;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs index 57e9125..48258ed 100644 --- a/compiler/typecheck/TcSimplify.lhs +++ b/compiler/typecheck/TcSimplify.lhs @@ -185,7 +185,7 @@ simplifyInfer :: Bool -- Apply monomorphism restriction TcEvBinds) -- ... binding these evidence variables simplifyInfer apply_mr tau_tvs wanted | isEmptyBag wanted -- Trivial case is quite common - = do { zonked_tau_tvs <- zonkTcTyVarsAndFV (varSetElems tau_tvs) + = do { zonked_tau_tvs <- zonkTcTyVarsAndFV tau_tvs ; gbl_tvs <- tcGetGlobalTyVars -- Already zonked ; qtvs <- zonkQuantifiedTyVars (varSetElems (zonked_tau_tvs `minusVarSet` gbl_tvs)) ; return (qtvs, [], emptyTcEvBinds) } @@ -202,7 +202,7 @@ simplifyInfer apply_mr tau_tvs wanted <- simplifyAsMuchAsPossible SimplInfer zonked_wanted ; gbl_tvs <- tcGetGlobalTyVars - ; zonked_tau_tvs <- zonkTcTyVarsAndFV (varSetElems tau_tvs) + ; zonked_tau_tvs <- zonkTcTyVarsAndFV tau_tvs ; zonked_simples <- mapBagM zonkWantedEvVar simple_wanted ; let qtvs = findQuantifiedTyVars apply_mr zonked_simples zonked_tau_tvs gbl_tvs (bound, free) | apply_mr = (emptyBag, zonked_simples) @@ -236,7 +236,7 @@ simplifyAsMuchAsPossible ctxt wanteds simplifyApproxLoop 0 wanteds -- Report any errors - ; mapBagM_ reportUnsolvedImplication unsolved_implics + ; reportUnsolved (emptyBag, unsolved_implics) ; let final_wanted_evvars = mapBag deCanonicaliseWanted unsolved_flats ; return (final_wanted_evvars, ev_binds) } @@ -405,7 +405,7 @@ simplifySuperClass self wanteds ; (unsolved, ev_binds) <- runTcS SimplCheck emptyVarSet $ do { can_self <- canGivens loc [self] - ; let inert = foldlBag extendInertSet emptyInert can_self + ; let inert = foldlBag updInertSet emptyInert can_self -- No need for solveInteract; we know it's inert ; solveWanteds inert wanteds } @@ -512,7 +512,7 @@ simplifyRule name tv_bndrs lhs_wanted rhs_wanted ; rhs_binds_var@(EvBindsVar evb_ref _) <- newTcEvBinds ; loc <- getCtLoc (RuleSkol name) ; rhs_binds1 <- simplifyCheck SimplCheck $ unitBag $ WcImplic $ - Implic { ic_env_tvs = emptyVarSet -- No untouchables + Implic { ic_untch = emptyVarSet -- No untouchables , ic_env = emptyNameEnv , ic_skols = mkVarSet tv_bndrs , ic_scoped = panic "emitImplication" @@ -642,12 +642,12 @@ solveImplication :: InertSet -- Given -- -- Precondition: everything is zonked by now solveImplication inert - imp@(Implic { ic_env_tvs = untch - , ic_binds = ev_binds - , ic_skols = skols - , ic_given = givens + imp@(Implic { ic_untch = untch + , ic_binds = ev_binds + , ic_skols = skols + , ic_given = givens , ic_wanted = wanteds - , ic_loc = loc }) + , ic_loc = loc }) = nestImplicTcS ev_binds untch $ do { traceTcS "solveImplication {" (ppr imp)