GHC Core question

Neil Mitchell ndmitchell at gmail.com
Mon Jan 7 17:38:58 EST 2008


Hi

> > I have now set the -ppr-debug flag, but that has no effect. It's not
> > entirely surprising, as I guess setting the flag only applies through
> > the GHC session, and this code is being run outside that. How can I
> > print the output (to a file) using the unique id's?
> >
>
> Good point about the session, I forgot about that. It looks like you
> can call showSDocDebug instead of showSDoc (see utils/Outputable.lhs),
> which acts as if -dppr-debug is set, but I haven't actually tried it.

That does indeed work - and I can now see exactly why you don't leave
it on all the time!


> > Can I invoke CoreTidy using the GHC API?
> >
>
> Yes, but you'll need to grab a post-Dec-25 build if you haven't
> already, since I added this recently. Once you have, see
> compileToCoreSimplified in main/GHC.hs.

/me upgrades

Many thanks,

Neil


More information about the Glasgow-haskell-users mailing list