On Sun, 4 Jan 2009 19:32:50 +0000
Andrew Oakley <[email protected]> wrote:

> As far as implementing this goes, it seems that liftLambda in Lift.hs
> is naming the function, but I can't work out where the code it is
> lifting came from.  Any pointers on that would be appreciated.  

Once I send ask the question it becomes obvious :).  Seems the name is
in ptid.  The following patch seems to do whats needed although I'm
really not sure about the "getUnqualified" bit, it seems like there must
be an easier way to generate the right thing.  

--- old-compiler/Lift.hs        2009-01-04 20:13:32.000000000 +0000
+++ new-compiler/Lift.hs        2009-01-04 20:13:32.000000000 +0000
@@ -114,7 +114,7 @@
       scHere =  (fun, PosLambda pos fl [] (newEnvs++args) exp)
       arity = length newEnvs + length args
       (fun,state2) = uniqueIS stateIn
-      tid = (visible (reverse ("LAMBDA" ++ strId fun))) -- Not exported
+      tid = (visible (reverse (getUnqualified ptid ++ "!LAMBDA" ++ strId 
fun))) -- Not exported
       newSC = scHere:scIn
       newState = seq tid $ addIS fun (InfoName fun tid arity
                                                (tidPos ptid pos) True) 
--PHtprof

Comments/suggestions please :)
_______________________________________________
Yhc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/yhc

Reply via email to