X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcUnify.lhs;h=348c70e4d43d1bd5849141986a76f86aa44fdcd3;hp=340be9afb52717c3da4253961f447f5139ecdb14;hb=5de363ca9ebdb7d85e3c353c1cffdf0a1c11128e;hpb=af2e0d24abe49e06fdee4a95530af8a5c33da4a3 diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs index 340be9a..348c70e 100644 --- a/compiler/typecheck/TcUnify.lhs +++ b/compiler/typecheck/TcUnify.lhs @@ -413,12 +413,12 @@ newImplication :: SkolemInfo -> TcTyVarSet -> [TcTyVar] newImplication skol_info free_tvs skol_tvs given thing_inside = ASSERT2( all isTcTyVar skol_tvs, ppr skol_tvs ) ASSERT2( all isSkolemTyVar skol_tvs, ppr skol_tvs ) - do { gbl_tvs <- tcGetGlobalTyVars - ; lcl_env <- getLclTypeEnv - ; let all_free_tvs = gbl_tvs `unionVarSet` free_tvs + do { gbl_tvs <- tcGetGlobalTyVars + ; free_tvs <- zonkTcTyVarsAndFV free_tvs + ; let untch = gbl_tvs `unionVarSet` free_tvs ; (result, wanted) <- getConstraints $ - setUntouchables all_free_tvs $ + setUntouchables untch $ thing_inside ; if isEmptyBag wanted && not (hasEqualities given) @@ -431,8 +431,9 @@ newImplication skol_info free_tvs skol_tvs given thing_inside return (emptyTcEvBinds, emptyWanteds, result) else do { ev_binds_var <- newTcEvBinds + ; lcl_env <- getLclTypeEnv ; loc <- getCtLoc skol_info - ; let implic = Implic { ic_env_tvs = all_free_tvs + ; let implic = Implic { ic_untch = untch , ic_env = lcl_env , ic_skols = mkVarSet skol_tvs , ic_scoped = panic "emitImplication" @@ -444,7 +445,6 @@ newImplication skol_info free_tvs skol_tvs given thing_inside ; return (TcEvBinds ev_binds_var, unitBag (WcImplic implic), result) } } \end{code} - %************************************************************************ %* * Boxy unification @@ -1194,7 +1194,7 @@ checkSigTyVarsWrt :: TcTyVarSet -> [TcTyVar] -> TcM () -- The extra_tvs can include boxy type variables; -- e.g. TcMatches.tcCheckExistentialPat checkSigTyVarsWrt extra_tvs sig_tvs - = do { extra_tvs' <- zonkTcTyVarsAndFV (varSetElems extra_tvs) + = do { extra_tvs' <- zonkTcTyVarsAndFV extra_tvs ; check_sig_tyvars extra_tvs' sig_tvs } check_sig_tyvars