-
Notifications
You must be signed in to change notification settings - Fork 185
Architecture
Dan edited this page Aug 21, 2013
·
2 revisions
Assorted notes on the GHC/JS architecture and inner workings. Hopefully will grow into a concise description.
GHC/JS compiles Haskell modules to JavaScript by, first, invoking the GHC API to compile haskell to the STG representation, then it translates this representation into JavaScript code. Each module is compiled in a different JavaScript object file (.js_o). The JavaScript modules are then linked as .jsexe files (JavaScript) and minified using the Google Closure Compiler.
- Compiler/Variants.hs
- Gen2/Generator.hs
- Gen2/Linker.hs
- Gen2/Object.hs - description of the
js_o
format - GHCJS.hs