X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcUnify.lhs;h=6738b0c18c7df5f7dd836586689bc381b0e2ea8e;hp=ade2db0d4935692b3334cb8f2a492a2ee553d77a;hb=a3bab0506498db41853543558c52a4fda0d183af;hpb=62f76a3cbced691b60f511fb83547a5d62653252 diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs index ade2db0..6738b0c 100644 --- a/compiler/typecheck/TcUnify.lhs +++ b/compiler/typecheck/TcUnify.lhs @@ -402,14 +402,11 @@ checkConstraints skol_info skol_tvs given thing_inside -- tcPolyExpr, which uses tcGen and hence checkConstraints. | otherwise - = do { (ev_binds, wanted, result) <- newImplication skol_info - skol_tvs given thing_inside - ; emitConstraints wanted - ; return (ev_binds, result) } + = newImplication skol_info skol_tvs given thing_inside newImplication :: SkolemInfo -> [TcTyVar] -> [EvVar] -> TcM result - -> TcM (TcEvBinds, WantedConstraints, result) + -> TcM (TcEvBinds, result) newImplication skol_info skol_tvs given thing_inside = ASSERT2( all isTcTyVar skol_tvs, ppr skol_tvs ) ASSERT2( all isSkolemTyVar skol_tvs, ppr skol_tvs ) @@ -424,7 +421,7 @@ newImplication skol_info skol_tvs given thing_inside -- we don't want to lose the "inaccessible alternative" -- error check then - return (emptyTcEvBinds, emptyWanteds, result) + return (emptyTcEvBinds, result) else do { ev_binds_var <- newTcEvBinds ; lcl_env <- getLclTypeEnv @@ -438,7 +435,8 @@ newImplication skol_info skol_tvs given thing_inside , ic_binds = ev_binds_var , ic_loc = loc } - ; return (TcEvBinds ev_binds_var, unitBag (WcImplic implic), result) } } + ; emitConstraint (WcImplic implic) + ; return (TcEvBinds ev_binds_var, result) } } \end{code} %************************************************************************