X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcType.lhs;h=b2da9f04a8eb4ae90f423fa47af80813633466a1;hb=62f76a3cbced691b60f511fb83547a5d62653252;hp=74100920bbf1aa4dea009b7a3b35d9c715edd1d4;hpb=038a429f51ad0625ea6bb31a94a40b2aeaeebca6;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index 7410092..b2da9f0 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -339,9 +339,6 @@ data SkolemInfo | RuntimeUnkSkol -- a type variable used to represent an unknown -- runtime type (used in the GHCi debugger) - | NoScSkol -- Used for the "self" superclass when solving - -- superclasses; don't generate superclasses of me - | UnkSkol -- Unhelpful info (until I improve it) ------------------------------------- @@ -451,6 +448,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 @@ -458,7 +458,6 @@ pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter bindings for") <+> pprWithCommas ppr ips pprSkolInfo (ClsSkol cls) = ptext (sLit "the class declaration for") <+> quotes (ppr cls) pprSkolInfo InstSkol = ptext (sLit "the instance declaration") -pprSkolInfo NoScSkol = ptext (sLit "the instance declaration (self)") pprSkolInfo FamInstSkol = ptext (sLit "the family instance declaration") pprSkolInfo (RuleSkol name) = ptext (sLit "the RULE") <+> doubleQuotes (ftext name) pprSkolInfo ArrowSkol = ptext (sLit "the arrow form") @@ -673,14 +672,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 @@ -1026,8 +1021,6 @@ getClassPredTys _ = panic "getClassPredTys" mkDictTy :: Class -> [Type] -> Type mkDictTy clas tys = mkPredTy (ClassP clas tys) - - isDictLikeTy :: Type -> Bool -- Note [Dictionary-like types] isDictLikeTy ty | Just ty' <- tcView ty = isDictTy ty'