From: sewardj Date: Wed, 1 Dec 1999 12:02:48 +0000 (+0000) Subject: [project @ 1999-12-01 12:02:48 by sewardj] X-Git-Tag: Approximately_9120_patches~5460 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=45e446f05efa8525f860f2292027068ed53dc23d;p=ghc-hetmet.git [project @ 1999-12-01 12:02:48 by sewardj] Disable the Mark Jones optimisation for instance decls, since it is incompatible with Hugs. --- diff --git a/ghc/compiler/basicTypes/MkId.lhs b/ghc/compiler/basicTypes/MkId.lhs index 158cc3d..878868f 100644 --- a/ghc/compiler/basicTypes/MkId.lhs +++ b/ghc/compiler/basicTypes/MkId.lhs @@ -453,6 +453,11 @@ mkDictFunId dfun_name clas inst_tyvars inst_tys inst_decl_theta (class_tyvars, sc_theta, _, _) = classBigSig clas sc_theta' = substTheta (mkTopTyVarSubst class_tyvars inst_tys) sc_theta + dfun_theta = inst_decl_theta + +{- 1 dec 99: disable the Mark Jones optimisation for the sake + of compatibility with Hugs. + dfun_theta = case inst_decl_theta of [] -> [] -- If inst_decl_theta is empty, then we don't -- want to have any dict arguments, so that we can @@ -472,7 +477,7 @@ mkDictFunId dfun_name clas inst_tyvars inst_tys inst_decl_theta -- class Foo a => Baz a b where ... -- instance Wob b => Baz T b where.. -- Now sc_theta' has Foo T - +-} dfun_ty = mkSigmaTy inst_tyvars dfun_theta (mkDictTy clas inst_tys) not_const (clas, tys) = not (isEmptyVarSet (tyVarsOfTypes tys))