This is a simple implementation of the book Types and Programming Languages.
The code is based on the implementation from the website http://www.cis.upenn.edu/~bcpierce/tapl.
arith: chapter 3, 4untyped: chapter 5, 6, 7simplytyped: chapter 8, 9, 10
ocaml == 4.08.1ocamllex == 4.08.1ocamlyacc == 4.08.1
- Build: run
make - Read from a file: run
./f test.f. - Use the REPL mode: run
./f -iand use;;like OCaml to seperate commands.
For example:
❯ ./f -i
> iszero 0;;
true
> succ succ 0;;
2
> if iszero succ 0 then succ 0 else 0;;
0
- Clean up the directory: run
make clean;