X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcType.lhs;h=47bb554e867d4760659079f8bd8bfbe3c6f89813;hb=14a496fd0b3aa821b69eb02736d5f41086576761;hp=194deb9a297cda4d62f22b13f0b7bfcbf9ea0656;hpb=a40f2735958055f7ff94e5df73e710044aa63b2c;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index 194deb9..47bb554 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -30,7 +30,7 @@ module TcType ( isImmutableTyVar, isSkolemTyVar, isMetaTyVar, isMetaTyVarTy, isSigTyVar, isExistentialTyVar, isTyConableTyVar, metaTvRef, - isFlexi, isIndirect, isRuntimeUnk, isUnk, + isFlexi, isIndirect, isUnkSkol, isRuntimeUnkSkol, -------------------------------- -- Builders @@ -335,6 +335,7 @@ data SkolemInfo | RuleSkol RuleName -- The LHS of a RULE | GenSkol TcType -- Bound when doing a subsumption check for ty + | RuntimeUnkSkol -- a type variable used to represent an unknown -- runtime type (used in the GHCi debugger) @@ -670,15 +671,17 @@ isFlexi _ = False isIndirect (Indirect _) = True isIndirect _ = False -isRuntimeUnk :: TyVar -> Bool -isRuntimeUnk x | isTcTyVar x - , SkolemTv RuntimeUnkSkol <- tcTyVarDetails x = True - | otherwise = False - -isUnk :: TyVar -> Bool -isUnk x | isTcTyVar x - , SkolemTv UnkSkol <- tcTyVarDetails x = True - | otherwise = False +isRuntimeUnkSkol :: TyVar -> Bool +-- Called only in TcErrors; see Note [Runtime skolems] there +isRuntimeUnkSkol x | isTcTyVar x + , SkolemTv RuntimeUnkSkol <- tcTyVarDetails x + = True + | otherwise = False + +isUnkSkol :: TyVar -> Bool +isUnkSkol x | isTcTyVar x + , SkolemTv UnkSkol <- tcTyVarDetails x = True + | otherwise = False \end{code}