Once again, I'm put out a plea for a modern programming language book written similar to this one, but for a statically-typed functional language. Like a basic ML or mini-Haskell. Yes, I know there are some examples in PlZoo and similar, but I'd love to follow a step-by-step book instead of a lump of code, or a dense research paper.<p>I'd pay good money for such a book, if it was well-written.<p>Stephen Diehl was on the way to writing such a book, but he stopped before he got to type checking and pattern matching, which are exactly what I've tended to struggle with. I can write a lisp or other dynamically-typed lambda calculus-based language with ease. The hard part is the type checker and (to a lesser extent) Hindley-Milner. I've managed to figure out Hindley-Milner but am stuck on how to write the pattern matcher and certain aspects of the type checker.<p>There are also one or two dense academic books from the 1970s that I found hard to follow. The one that's helped me get the furthest is Pierce's Types and Programming Languages, which is dense and academic but also well-written and with good examples. But I'd really love such a book written in a similar style to this "Compiler Book", "Writing an Interpreter in Go", etc.<p>Also, a general complaint about recent compiler/interpreter books: Most of these books go deep into parsing (the easiest part) and ASTs, but then they spend relatively little time on codegen and type checking, which are far more difficult.