... | ... | @@ -7,7 +7,7 @@ Video: [STG language](http://www.youtube.com/watch?v=v0J1iZ7F7W8&list=PLBkRCigjP |
|
|
Before code generation, GHC converts the Core-language program into `StgSyn`. The basic ideas are still pretty much exactly as described in the paper [Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine](http://research.microsoft.com/en-us/um/people/simonpj/papers/spineless-tagless-gmachine.ps.gz).
|
|
|
|
|
|
|
|
|
The best way to think of STG is as special form of [Core](commentary/compiler/core-syn-type). Specifically, the differences are these (see [compiler/stgSyn/StgSyn.hs](https://gitlab.haskell.org/ghc/ghc/tree/master/ghc/compiler/stgSyn/StgSyn.hs)):
|
|
|
The best way to think of STG is as special form of [Core](commentary/compiler/core-syn-type). Specifically, the differences are these (see [compiler/stgSyn/StgSyn.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/stgSyn/StgSyn.hs)):
|
|
|
|
|
|
- Function arguments are atoms (literals or variables), of type `StgArg`.
|
|
|
- The right hand side of a let-binding, `StgRhs`, is either
|
... | ... | |