Legend:

Before code generation, GHC converts the Core-language program into {{{StgSyn}}}. The basic ideas are still pretty much exactly as described in the paper [http://research.microsoft.com/copyright/accept.asp?path=/users/simonpj/papers/spineless-tagless-gmachine.ps.gz Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine].

6

6

7

The best way to think of STG is as special form of Core. Specifically, the differences are these (see [[GhcFile(compiler/stgSyn/StgSyn.lhs)]]):

7

The best way to think of STG is as special form of [wiki:Commentary/Compiler/CoreSynType Core]. Specifically, the differences are these (see [[GhcFile(compiler/stgSyn/StgSyn.lhs)]]):