From c3b98e8875420ca5724af0d015a5c99870ff326b Mon Sep 17 00:00:00 2001 From: simonpj Date: Wed, 24 Jun 1998 11:28:06 +0000 Subject: [PATCH] [project @ 1998-06-24 11:28:06 by simonpj] Specialiser for rec bindings --- ghc/compiler/specialise/Specialise.lhs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/specialise/Specialise.lhs b/ghc/compiler/specialise/Specialise.lhs index a1c602d..5d082ca 100644 --- a/ghc/compiler/specialise/Specialise.lhs +++ b/ghc/compiler/specialise/Specialise.lhs @@ -746,9 +746,16 @@ specBind (Rec pairs) body_uds (body_uds `plusUDs` spec_uds) -- See notes for non-rec case - new_bind = Rec (spec_defns ++ pairs') + new_bind = Rec (spec_defns ++ + pairs' ++ + [(d,r) | (d,r,_,_) <- dict_binds]) + -- We need to Rec together the dict_binds too, because they + -- can be recursive; this happens when an overloaded function + -- is used as a method in an instance declaration. + -- (The particular program that showed this up was + -- docon/source/auxil/DInteger.hs) in - returnSM ( new_bind : mkDictBinds dict_binds, all_uds ) + returnSM ( [new_bind], all_uds ) specDefn :: CallDetails -- Info on how it is used in its scope -> (Id, CoreExpr) -- The thing being bound and its un-processed RHS -- 1.7.10.4