Notes: Haskell Programming from First Principles by Chris Allen & Julie Moronuki

Posted on November 1, 2017 by jcb


Preliminary Remarks

This page contains my notes and exercise solutions for the text “Haskell Programming From First Principles” by Chris Allen and Julie Moronuki.

Brief review: I love this book. I love Haskell. I worry this book has been so good at teaching me Haskell that I’m going to love other languages less by comparison. The book’s philosophy of “Let’s break complicated topics down into simple pieces, and then play with the pieces until they become obvious” is so effective that I’m going to just reflexively hold every other CS book to the same standard from now on. I suspect this is going to leave me very disappointed, since most other programming books aren’t anywhere near this fun.

Okay, maybe that’s a little hyperbolic. I don’t want to give the impression that HPFP is a text without flaws. I’ll probably talk about those flaws at some point, but before I do I want to make it perfectly clear that this book is spectacular and any criticism is made with the greatest possible love and affection.

I deeply admire what Julie Moronuki and Chris Allen have accomplished here, and I encourage anyone interested in programming to buy a copy at I am also eagerly awaiting Julie’s upcoming book The Joy of Haskell and Chris’ Haskell Almanac.

A little house-keeping first: My notes and exercise solutions, are not designed to make much sense without reference to the text itself. My intended reader is someone who has already bought HPFP and wants to check their own work against someone else’s. Please buy the book; supporting great authors now means more great books for everyone in the future.

Also, each chapter of HPFP has a list follow-up resources at the end. In my chapter notes, I’ll link to separate posts containing my notes on each of these resources.

Lastly, my GitHub repository containing my solutions for HPFP is here.