Don't barf on error message with non-tc tyvars
[ghc-hetmet.git] / compiler / typecheck / TcSimplify.lhs
index 4670a15..3be5415 100644 (file)
@@ -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