Write You a Haskell: Building a modern functional compiler from first principles
by Stephen Diehl
Publisher: StephenDiehl.com 2015
Number of pages: 246
Description:
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.
Download or read it online for free here:
Read online
(online html)
Similar books

by P.D. Terry - Rhodes University
Designed for computer science students studying for a second year course in compilers/programming language translation, this text manages to combine theory, applications and use of compiler writing tools to give a solid introduction to the subject.
(11280 views)

by Dirk Vermeir - Vrije Universiteit Brussel
Contents: Introduction; Lexical analysis; Parsing; Checking static semantics; Intermediate code generation; Optimization of intermediate code; Code generation; Introduction to x86 Assembler Programming under Linux; Mc: the Micro-x86 Compiler; etc.
(11817 views)

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.
(10232 views)

- Wikibooks
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.
(9182 views)