From 45e446f05efa8525f860f2292027068ed53dc23d Mon Sep 17 00:00:00 2001 From: sewardj Date: Wed, 1 Dec 1999 12:02:48 +0000 Subject: [PATCH] [project @ 1999-12-01 12:02:48 by sewardj] Disable the Mark Jones optimisation for instance decls, since it is incompatible with Hugs. --- ghc/compiler/basicTypes/MkId.lhs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)) -- 1.7.10.4