Awesome
<p align="center"> <a href="http://dev.stephendiehl.com/fun/"> <img src="https://github.com/sdiehl/write-you-a-haskell/raw/master/img/Haskell-Logo.png"/> </a> </p> <p align="center"> <a href="http://dev.stephendiehl.com/fun/"> <img src="https://github.com/sdiehl/write-you-a-haskell/raw/master/img/cover.png"/> </a> <br/> <em>Building a modern functional compiler from first principles.</em> </p> <p align="center"> <a href="https://twitter.com/smdiehl">Stephen Diehl</a> </p>Read Online:
Releases
This is a work in progress.
- Chapter 1: Introduction
- Chapter 2: Haskell Basics
- Chapter 3: Parsing
- Chapter 4: Lambda Calculus
- Chapter 5: Type Systems
- Chapter 6: Evaluation
- Chapter 7: Hindley-Milner Inference
- Chapter 8: Design of ProtoHaskell
- Chapter 9: Extended Parser
- Chapter 10: Custom Datatypes
- [Chapter 11: Renamer] (http://dev.stephendiehl.com/fun/010_renamer.html)
- Chapter 12: Pattern Matching & Desugaring
- Chapter 13: System-F
- Chapter 14: Type Classes
- Chapter 15: Core Language
- Chapter 16: Kinds
- Chapter 17: Haskell Type Checker
- Chapter 18: Core Interpreter
- Chapter 19: Prelude
- Chapter 20: Design of Lazy Evaluation
- Chapter 21: STG
- Chapter 22: Compilation
- Chapter 23: Design of the Runtime
- Chapter 24: Imp
- Chapter 25: Code Generation ( C )
- Chapter 26: Code Generation ( LLVM )
- Chapter 27: Row Polymorphism & Effect Typing
- Chapter 28: Future Work
Building
To generate the build scripts provision a cabal sandbox with pandoc in it. This
is done by the write-you-a-haskell.cabal
and stack.yaml
files.
Stack
$ stack exec make
To generate the pdf, the LaTeX packages must be installed on the system.
$ sudo apt-get install texlive-xetex texlive-latex-extra
$ sudo apt-get install xzdec
$ sudo tlmgr install zapfding
$ stack exec make pdf
Generation of the epub is also supported.
$ stack exec make epub
Cabal
$ cabal sandbox init
$ cabal install --only-dependencies
$ cabal exec bash
$ make
Contributing
Any and all contributions are always welcome. As always, I rely on the perpetual kindness and goodwill of Haskellers (like you!) to help correct grammar, clarify, and fix errors.
License
<img src="http://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc-sa.png" width="140" alt="Artwork CC BY NC SA" />This written work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. You may reproduce and edit this work with attribution for all non-commercial purposes.
The included source is released under the terms of the MIT License.