splitRhoTy, tyVarsOfType, tyVarsOfTypes, tyVarsOfPred,
mkSynTy, tidyOpenType, tidyOpenTypes
)
-import Subst ( emptyInScopeSet, mkSubst,
+import Subst ( emptyInScopeSet, mkSubst, mkInScopeSet,
substTy, substClasses, mkTyVarSubst, mkTopTyVarSubst
)
import Literal ( inIntRange )
FoundInst tenv dfun_id
-> let
- subst = mkSubst (tyVarsOfTypes tys) tenv
+ subst = mkSubst (mkInScopeSet (tyVarsOfTypes tys)) tenv
(tyvars, rho) = splitForAllTys (idType dfun_id)
ty_args = map subst_tv tyvars
dfun_rho = substTy subst rho