X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcInstDcls.lhs;h=a7e7d9fb50c3954c691314611ec252f5b67ee22e;hb=90fa6b84fdc99ba99c0b7df9691ca69d50b62530;hp=b2298bff09ce0c4aa60a06b712f2da847729e05b;hpb=b125ffe2eff1a31ab7b53e1dc2355fe6115838d9;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcInstDcls.lhs b/ghc/compiler/typecheck/TcInstDcls.lhs index b2298bf..a7e7d9f 100644 --- a/ghc/compiler/typecheck/TcInstDcls.lhs +++ b/ghc/compiler/typecheck/TcInstDcls.lhs @@ -30,11 +30,10 @@ import TcDeriv ( tcDeriving ) import TcEnv ( TcEnv, tcExtendGlobalValEnv, tcExtendTyVarEnvForMeths, tcAddImportedIdInfo, tcInstId, tcLookupClass, + InstInfo(..), pprInstInfo, simpleInstInfoTyCon, simpleInstInfoTy, isLocalInst, newDFunName, tcExtendTyVarEnv ) -import InstEnv ( InstInfo(..), InstEnv, pprInstInfo, classDataCon, - simpleInstInfoTyCon, simpleInstInfoTy, isLocalInst, - extendInstEnv ) +import InstEnv ( InstEnv, classDataCon, extendInstEnv ) import TcMonoType ( tcTyVars, tcHsSigType, kcHsSigType ) import TcSimplify ( tcSimplifyAndCheck ) import TcType ( zonkTcSigTyVars ) @@ -191,7 +190,7 @@ tcInstDecls1 inst_env0 prs hst unf_env get_fixity mod local_tycons decls -- The result of (b) replaces the cached InstEnv in the PCS let (local_inst_info, imported_inst_info) - = partition isLocalInst (concat inst_infos) + = partition (isLocalInst mod) (concat inst_infos) imported_dfuns = map (tcAddImportedIdInfo unf_env . iDFunId) imported_inst_info @@ -817,3 +816,5 @@ nonBoxedPrimCCallErr clas inst_ty methodCtxt = ptext SLIT("When checking the methods of an instance declaration") superClassCtxt = ptext SLIT("When checking the superclasses of an instance declaration") \end{code} + +