pcf

A one file compiler for PCF

Latest on Hackage:0.1.0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Danny Gratzer
Maintained by [email protected]

PCF is a small programming language with higher order functions, natural numbers, and recursion. It is statically tpyed and turing complete (general recursion and all that). This compiler transformers a PCF expression into a file of C code that when run outputs the answer. It is mostly intended as a demonstration of how to write such a compiler. The curious reader should look at the writeup.