From eb731f1519b868fa9686f2a56280dd1aaf8edc9d Mon Sep 17 00:00:00 2001 From: Manuel M T Chakravarty Date: Thu, 18 Oct 2007 06:03:36 +0000 Subject: [PATCH] Don't barf on error message with non-tc tyvars MERGE TO STABLE --- compiler/typecheck/TcSimplify.lhs | 5 +++-- compiler/typecheck/TcTyFuns.lhs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs index 4670a15..3be5415 100644 --- a/compiler/typecheck/TcSimplify.lhs +++ b/compiler/typecheck/TcSimplify.lhs @@ -3110,8 +3110,9 @@ mkMonomorphismMsg tidy_env inst_tvs nest 2 (vcat docs), monomorphism_fix dflags] -isRuntimeUnk :: TcTyVar -> Bool -isRuntimeUnk x | SkolemTv RuntimeUnkSkol <- tcTyVarDetails x = True +isRuntimeUnk :: TyVar -> Bool +isRuntimeUnk x | isTcTyVar x + , SkolemTv RuntimeUnkSkol <- tcTyVarDetails x = True | otherwise = False monomorphism_fix :: DynFlags -> SDoc diff --git a/compiler/typecheck/TcTyFuns.lhs b/compiler/typecheck/TcTyFuns.lhs index cb0eeae..4e3f728 100644 --- a/compiler/typecheck/TcTyFuns.lhs +++ b/compiler/typecheck/TcTyFuns.lhs @@ -1236,7 +1236,7 @@ ppr_ty env ty -- (ppr_extra env ty) shows extra info about 'ty' ppr_extra :: TidyEnv -> Type -> TcM (TidyEnv, SDoc) ppr_extra env (TyVarTy tv) - | isSkolemTyVar tv || isSigTyVar tv + | isTcTyVar tv && (isSkolemTyVar tv || isSigTyVar tv) = return (env1, pprSkolTvBinding tv1) where (env1, tv1) = tidySkolemTyVar env tv -- 1.7.10.4