-ddump-stg code

Simon Peyton-Jones simonpj at microsoft.com
Mon Nov 19 04:32:00 EST 2007


I suspect you probably want -ddump-simpl, which prints the "Core" form. This is fully typed, unlike STG code which is only partially typed.

If you compile with -fext-core you'll get a printed form which is supposed to be reasonably easy to parse. Tim Chevalier and Aaron Tomb are working on this.

You may also find it easier to use the GHC API: you should be able to import module GHC, and use its API to compile your module and return the (typed) Core syntax tree to your back end.

Simon

From: cvs-ghc-bounces at haskell.org [mailto:cvs-ghc-bounces at haskell.org] On Behalf Of Guilherme Avelino
Sent: 16 November 2007 20:14
To: cvs-ghc at haskell.org
Subject: -ddump-stg code

Hi,

I want to use the stg code generated by the ghc with a frontend for my compiler. I´m using the flags -ddump-stg  and  -dppr-debug to obtain the STG informations. However there are some things that I din´t understand. Are there any document where I can find informations about the stg generated? Is it possible to do the ghc show type informations?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/cvs-ghc/attachments/20071119/a02ecc44/attachment-0001.htm


More information about the Cvs-ghc mailing list