X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Ftypecheck%2FTcInstDcls.lhs;fp=ghc%2Fcompiler%2Ftypecheck%2FTcInstDcls.lhs;h=ff97a4bd6e07216d2b6ff39a182f5679857b610f;hb=04612d54b51bebf809717d1cf0242efb6294ee59;hp=929797a651729789a1ce982f6e4562a2986dea2d;hpb=94df10136b6e879bb55ce04796942da9d0367a5a;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcInstDcls.lhs b/ghc/compiler/typecheck/TcInstDcls.lhs index 929797a..ff97a4b 100644 --- a/ghc/compiler/typecheck/TcInstDcls.lhs +++ b/ghc/compiler/typecheck/TcInstDcls.lhs @@ -27,7 +27,7 @@ import TcEnv ( tcExtendGlobalValEnv, tcExtendTyVarEnv, import TcHsType ( kcHsSigType, tcHsKindedType ) import TcUnify ( checkSigTyVars ) import TcSimplify ( tcSimplifyCheck, tcSimplifyTop ) -import Type ( zipTvSubst, substTheta, substTys ) +import Type ( zipOpenTvSubst, substTheta, substTys ) import DataCon ( classDataCon ) import Class ( classBigSig ) import Var ( Id, idName, idType ) @@ -328,7 +328,7 @@ tcInstDecl2 (InstInfo { iDFunId = dfun_id, iBinds = binds }) (class_tyvars, sc_theta, _, op_items) = classBigSig clas -- Instantiate the super-class context with inst_tys - sc_theta' = substTheta (zipTvSubst class_tyvars inst_tys') sc_theta + sc_theta' = substTheta (zipOpenTvSubst class_tyvars inst_tys') sc_theta origin = SigOrigin rigid_info in -- Create dictionary Ids from the specified instance contexts. @@ -512,7 +512,7 @@ tcMethods origin clas inst_tyvars' dfun_theta' inst_tys' -- of the type variables in the instance declaration; but rep_tys doesn't -- have the skolemised version, so we substitute them in here rep_tys' = substTys subst rep_tys - subst = zipTvSubst inst_tyvars' (mkTyVarTys inst_tyvars') + subst = zipOpenTvSubst inst_tyvars' (mkTyVarTys inst_tyvars') \end{code} Note: [Superclass loops]