catamorphism at gmail.com
Sat Nov 17 01:01:36 EST 2007
On 11/16/07, Guilherme Avelino <gavelino at gmail.com> wrote:
> 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?
This format is really meant to be read by humans rather than machines.
And anyway, for most applications, it's better to use Core rather than
STG. GHC theoretically has the ability to emit external Core programs,
but unfortunately that feature isn't working right now. But if you
download GHC 6.8.1, and assuming you're implementing your compiler in
Haskell, you can use the GHC API to compile Haskell programs to Core:
If you run into problems, feel free to ask here.
Tim Chevalier * catamorphism.org * Often in error, never in doubt
"Friendship is exasperating at best. But think of the alternative." --
More information about the Cvs-ghc