From: simonpj Date: Wed, 24 Jun 1998 11:28:06 +0000 (+0000) Subject: [project @ 1998-06-24 11:28:06 by simonpj] X-Git-Tag: Approx_2487_patches~563 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c3b98e8875420ca5724af0d015a5c99870ff326b;p=ghc-hetmet.git [project @ 1998-06-24 11:28:06 by simonpj] Specialiser for rec bindings --- 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