X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Ftypes%2FInstEnv.lhs;h=965ba55e55cd42e211441ae0ac780614852ccce0;hb=4a6671660d388418a19a2cbda407e494e4ff5a3b;hp=46ab2cbcd457fda763e44fed5c7190fc0ac67100;hpb=c82fa23e85ccb3fd6224fd446811a773cf6028c1;p=ghc-hetmet.git diff --git a/ghc/compiler/types/InstEnv.lhs b/ghc/compiler/types/InstEnv.lhs index 46ab2cb..965ba55 100644 --- a/ghc/compiler/types/InstEnv.lhs +++ b/ghc/compiler/types/InstEnv.lhs @@ -17,7 +17,7 @@ module InstEnv ( #include "HsVersions.h" import Class ( Class, classTvsFds ) -import Var ( Id ) +import Var ( Id, isTcTyVar ) import VarSet import Type ( TvSubst ) import TcType ( Type, tcTyConAppTyCon, tcIsTyVarTy, @@ -332,8 +332,8 @@ lookup_inst_env env key_cls key_tys key_all_tvs Just _ -> find rest ms (dfun_id:us) Nothing -> find rest ms us - bind_fn tv | isExistentialTyVar tv = Skolem - | otherwise = BindMe + bind_fn tv | isTcTyVar tv && isExistentialTyVar tv = Skolem + | otherwise = BindMe -- The key_tys can contain skolem constants, and we can guarantee that those -- are never going to be instantiated to anything, so we should not involve -- them in the unification test. Example: