A (final) re-engineering of the new typechecker
[ghc-hetmet.git] / compiler / typecheck / TcType.lhs
index 7410092..8a95b0f 100644 (file)
@@ -451,6 +451,9 @@ pprSkolTvBinding tv
                                   sep [pprSkolInfo info, 
                                        nest 2 (ptext (sLit "at") <+> ppr (getSrcLoc tv))]]
  
+instance Outputable SkolemInfo where
+  ppr = pprSkolInfo
+
 pprSkolInfo :: SkolemInfo -> SDoc
 -- Complete the sentence "is a rigid type variable bound by..."
 pprSkolInfo (SigSkol ctxt)  = pprUserTypeCtxt ctxt
@@ -673,14 +676,10 @@ isIndirect _            = False
 
 isRuntimeUnkSkol :: TyVar -> Bool
 -- Called only in TcErrors; see Note [Runtime skolems] there
-isRuntimeUnkSkol x 
-  | isTcTyVar x
-  , SkolemTv info <- tcTyVarDetails x 
-  = case info of 
-       UnkSkol -> True
-       RuntimeUnkSkol -> True
-       _ -> False
-  | otherwise = False
+isRuntimeUnkSkol x | isTcTyVar x
+                  , SkolemTv RuntimeUnkSkol <- tcTyVarDetails x 
+                  = True
+                  | otherwise = False
 
 isUnkSkol :: TyVar -> Bool
 isUnkSkol x | isTcTyVar x