Chapter 5, 6, and 7 of the ocaml/kaleidoscope tutorial