X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcType.lhs;h=89aba6504f1d4fce2f54642c76026afb540a7519;hp=b2da9f04a8eb4ae90f423fa47af80813633466a1;hb=a3bab0506498db41853543558c52a4fda0d183af;hpb=62f76a3cbced691b60f511fb83547a5d62653252 diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index b2da9f0..89aba65 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -28,7 +28,7 @@ module TcType ( MetaDetails(Flexi, Indirect), MetaInfo(..), SkolemInfo(..), pprSkolTvBinding, pprSkolInfo, isImmutableTyVar, isSkolemTyVar, isMetaTyVar, isMetaTyVarTy, - isSigTyVar, isExistentialTyVar, isTyConableTyVar, + isSigTyVar, isOverlappableTyVar, isTyConableTyVar, metaTvRef, isFlexi, isIndirect, isUnkSkol, isRuntimeUnkSkol, @@ -614,7 +614,7 @@ isImmutableTyVar tv | isTcTyVar tv = isSkolemTyVar tv | otherwise = True -isTyConableTyVar, isSkolemTyVar, isExistentialTyVar, +isTyConableTyVar, isSkolemTyVar, isOverlappableTyVar, isMetaTyVar :: TcTyVar -> Bool isTyConableTyVar tv @@ -633,11 +633,14 @@ isSkolemTyVar tv FlatSkol {} -> True MetaTv {} -> False -isExistentialTyVar tv -- Existential type variable, bound by a pattern +-- isOverlappableTyVar has a unique purpose. +-- See Note [Binding when looking up instances] in InstEnv. +isOverlappableTyVar tv = ASSERT( isTcTyVar tv ) case tcTyVarDetails tv of - SkolemTv (PatSkol {}) -> True - _ -> False + SkolemTv (PatSkol {}) -> True + SkolemTv (InstSkol {}) -> True + _ -> False isMetaTyVar tv = ASSERT2( isTcTyVar tv, ppr tv )