← All repos

write-you-a-haskell

Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)

bookcompilerevaluationfunctional-languagefunctional-programminghaskelhindley-milnerintermediate-representationlambda-calculuspdf-booktypetype-checkingtype-inferencetype-systemtype-theory
Browse cluster: Functional Programming & Type Theory
299commits
35contributors
14languages

Tech stack & purpose

Write You a Haskell is an educational resource by Stephen Diehl for building a modern functional compiler from first principles. The project combines a book (available in HTML and PDF formats) with accompanying Haskell source code examples covering topics from lambda calculus and type systems through Hindley-Milner type inference, evaluation strategies, and compiler design. The code examples are built in Haskell using Cabal and Stack, and include progressively complex implementations such as untyped and typed arithmetic evaluators, lambda calculus interpreters, polymorphic type inference systems, and a parser generator using the Happy and Alex toolchain. All source code is released under the MIT License.

Community & reference links

Languages

Haskell
81.1%
CSS
4.7%
OCaml
2.9%
Python
1.7%
JavaScript
1.7%
Yacc
1.4%
C++
1.4%
Logos
1.2%
HTML
1.2%
Makefile
1.1%
LLVM
0.6%
C
0.6%
Shell
0.1%
Standard ML
0.1%

Contributors (top 30 of 35)