RE: Retrieving closure code during code generation

2009-03-03 Thread Simon Peyton-Jones
There's no mapping Id -> CmmProc in the CgMonad at the moment, but it'd be easy to add, at least for top-level procedures. However in the example you give, 'f' is a parameter of 'map', so there's no hope of finding what it's bound to, because that depends on the caller (which might not even hav

Re: Retrieving closure code during code generation

2009-03-03 Thread Simon Marlow
William Jones wrote: I am currently working with GHC's code generator and am wondering if there is any way I can retrieve the Cmm for a function during the compilation of another? I have looked at the information passed using CgMonad and at the bindings in scope but these don't seem to be what