Commit eb731f15 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Don't barf on error message with non-tc tyvars

MERGE TO STABLE
parent 7a59d519
......@@ -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
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment