From 27ce72702884209dc30f16c481b4e678560b9a5b Mon Sep 17 00:00:00 2001
From: kglynn <unknown>
Date: Wed, 14 Apr 1999 04:07:57 +0000
Subject: [PATCH] [project @ 1999-04-14 04:07:57 by kglynn] (keving)

Sigh,  No point w/w pass storing the worker id in wrapper's info
field,  because later simplifications may change the worker id. I've
restored the original code which looks in the wrapper function and
guesses the worker id.  With the addition of CPR transf. this looks a
bit fragile. thinks, thinks, ....
---
 ghc/compiler/main/MkIface.lhs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ghc/compiler/main/MkIface.lhs b/ghc/compiler/main/MkIface.lhs
index ea3f81ce13c1..af158b49a69b 100644
--- a/ghc/compiler/main/MkIface.lhs
+++ b/ghc/compiler/main/MkIface.lhs
@@ -305,8 +305,11 @@ ifaceId get_idinfo needed_ids is_rec id rhs
 		| otherwise      = ppr work_id <+> 
 				   braces (hsep (map ppr con_list))
 
-    (Just work_id) = work_info
-    wrapper_cons   = snd $ getWorkerIdAndCons id rhs
+--    (Just work_id) = work_info
+-- Temporary fix.  We can't use the worker id saved by the w/w
+-- pass because later optimisations may have changed it.  So try
+-- to snaffle from the wrapper code again ...
+    (work_id, wrapper_cons)   = getWorkerIdAndCons id rhs
     con_list       = uniqSetToList wrapper_cons
 
     ------------  Unfolding  --------------
-- 
GitLab