Using GHC API to generate STG

2008-04-15 Thread Mark Wassell
Hello, I am looking at how GHC generates STG and I am finding with a very simple piece of Haskell my usage of the API is not generating as much STG as I see when using -dump-stg option. In particular it isn't generating a binding for the nullary constructor LNull (I hope that's the correct

RE: Using GHC API to generate STG

2008-04-15 Thread Simon Peyton-Jones
LNull is a constructor, so it has no definition in STG. How might it be defined? LNull = ??? Instead, the code generator takes the list of data types (TyCons) as well as the list of bindings. From the former it generates all the per-data-type goop, including info tables for its