A simple lazy language compiled to C via STG [Peyton Jones & Salkild 1989]; implemented in Haskell and C. The goal is to build a simple, easy-to-understand compiler for a small, lazy core language (similar to GHC core) to use as a platform for experimentation with larger source languages.
Core => GCode compilerGCode interpreterGCode compiler (to C)Replace G-Machine with STG [Peyton Jones & Salkild 1989]- LLVM backend
Extend core language to System-F [Reynolds 1974]
simplelang BACKEND SOURCEFILE
Backends:
- -bviac - Generate C code (from STG). Requires
RTS.hand must be compiled withRTS.c. - -bpp - Pretty print core code.
- -bppstg - Generate and pretty print STG code.
- examples
- Example programs
- rts
- Runtime system code (C)
- src
- Compiler and interpreter source code (Haskell)
- Core - Core language
- AST - Core language syntax tree and helpter functions.
- TypeCheck - Type-checks core AST
- Parsec - Parsec parser for core.
- PrettyPrinter - Functions for pretty printing of core AST.
- STG - STG generation, pretty printing and compilation.
- Util - Miscellaneous helpers