On 11/16/07, Guilherme Avelino <[EMAIL PROTECTED]> wrote:
> 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?
>

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:
http://haskell.org/haskellwiki/GHC/As_a_library

If you run into problems, feel free to ask here.

Cheers,
Tim

-- 
Tim Chevalier * catamorphism.org * Often in error, never in doubt
"Friendship is exasperating at best. But think of the alternative." --
Don DeLillo

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to