Write You a Haskell: Building a modern functional compiler from first principles
by Stephen Diehl
Publisher: StephenDiehl.com 2015
Number of pages: 246
We will build a small functional language called Fun which is a partial Haskell 2010 toy language; complete with a parser, type inference, datatypes, pattern matching, desugaring, typeclasses, higher-kinded types, monadic IO, arbitrary-rank polymorphism, records, Core language, STG intermediate language, lazy evaluation, interpreter, native code generator, a runtime, and several optimization passes.
Home page url
Download or read it online for free here:
The purpose of this book is to provide practical advice on writing a compiler, together with some examples of both compilers and interpreters, in order to break away from the concept that building compilers and interpreters are impossible tasks.
by Seth D. Bergmann - Rowan University
This is an introductory level text for compiler design courses, that emphasizes problem solving skills. The concepts are clearly presented with sampler problems and diagrams to illustrate the concepts. The text also covers lex and yacc.
by Niklaus Wirth, Jürg Gutknecht
Here are the results of Project Oberon, which goal was to design an entire system from scratch. It gives advice on how a system might be built, and demonstrates how one was built. Program listings alone contain the ultimate explanations.
by Nils M Holm - Lulu Press
This book explains compiler construction in simple terms and by means of practical examples, but without avoiding the fundamental theory. It does not stop where other books do, and takes you on a tour through the whole compilation process.