X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcSimplify.lhs;h=f187cdcf088b6bb9f47e3b51b8e5b1721624497c;hb=ac10f8408520a30e8437496d320b8b86afda2e8f;hp=8ff7474b7612f6d59664a5e3d0b48bc6b8a7f276;hpb=e31827c6f8e3dc8aee72500cd224c7bdb4f6a764;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcSimplify.lhs b/ghc/compiler/typecheck/TcSimplify.lhs index 8ff7474..f187cdc 100644 --- a/ghc/compiler/typecheck/TcSimplify.lhs +++ b/ghc/compiler/typecheck/TcSimplify.lhs @@ -20,7 +20,7 @@ module TcSimplify ( #include "HsVersions.h" -import {-# SOURCE #-} TcUnify( unifyTauTy ) +import {-# SOURCE #-} TcUnify( unifyType ) import HsSyn ( HsBind(..), HsExpr(..), LHsExpr, emptyLHsBinds ) import TcHsSyn ( mkHsApp, mkHsTyApp, mkHsDictApp ) @@ -1661,7 +1661,7 @@ tcImprove avails = addErrCtxt doc $ tcInstTyVars (varSetElems qtvs) `thenM` \ (_, _, tenv) -> mapM_ (unif_pr tenv) pairs - unif_pr tenv (ty1,ty2) = unifyTauTy (substTy tenv ty1) (substTy tenv ty2) + unif_pr tenv (ty1,ty2) = unifyType (substTy tenv ty1) (substTy tenv ty2) \end{code} The main context-reduction function is @reduce@. Here's its game plan. @@ -2159,7 +2159,7 @@ disambigGroup dicts choose_default default_ty -- Commit to tyvar = default_ty = -- Bind the type variable - unifyTauTy default_ty (mkTyVarTy tyvar) `thenM_` + unifyType default_ty (mkTyVarTy tyvar) `thenM_` -- and reduce the context, for real this time simpleReduceLoop (text "disambig" <+> ppr dicts) reduceMe dicts `thenM` \ (frees, binds, ambigs) -> @@ -2345,8 +2345,9 @@ addTopIPErrs bndrs ips = addErrTcM (tidy_env, mk_msg tidy_ips) where (tidy_env, tidy_ips) = tidyInsts ips - mk_msg ips = vcat [sep [ptext SLIT("Implicit parameters escape from the monomorphic top-level binding(s) of"), - pprBinders bndrs <> colon], + mk_msg ips = vcat [sep [ptext SLIT("Implicit parameters escape from"), + nest 2 (ptext SLIT("the monomorphic top-level binding(s) of") + <+> pprBinders bndrs <> colon)], nest 2 (vcat (map ppr_ip ips)), monomorphism_fix] ppr_ip ip = pprPred (dictPred ip) <+> pprInstLoc (instLoc ip) @@ -2426,7 +2427,7 @@ addNoInstanceErrs mb_what givens dicts ispecs = [ispec | (_, ispec) <- matches] mk_probable_fix tidy_env dicts - = returnM (tidy_env, sep [ptext SLIT("Probable fix:"), nest 2 (vcat fixes)]) + = returnM (tidy_env, sep [ptext SLIT("Possible fix:"), nest 2 (vcat fixes)]) where fixes = add_ors (fix1 ++ fix2)