Skip to content
rpeszek edited this page Nov 30, 2018 · 58 revisions

CTFP Notes

This wiki contains markdown versions of literate Haskell notes from reading Bartosz Milewski's book Category Theory for Programmers.

This is my second reading of the book. To get more out of it, I decided to dedicate some time to finding (or coming up with) conceptual code examples.

I think my notes are ready for public. This project will be a perpetual work in progress, I intend to add to the notes and keep rethinking them as I learn more about the subject. These notes are not perfect and I wrote many of them just for myself.

My focus was on

  • writing conceptual Haskell code to supplement code already in the book
  • including some equational reasoning proofs using Haskell code this is simpler but less general than the mathematical approach in the book
  • expressing non-Hask categories in Haskell, in particular, a simple directed graph category with the shape A->B=>C
  • supplementing topics in the book with examples using that simple A->B=>C category
  • writing down some thoughts that helped me internalize the concepts

Reading some of these notes can feel out of context, unless corresponding chapter in the book is read first.
This work is not as polished and thought out as Milewski's book, I will slowly try to make it better and deeper.

Common conventions used in my notes

  • : is added to type level operators, for example :. is type level composition
  • code blocks without language annotations are used for proofs (like equational reasoning) or for code fragments used for documentation/reference only (like typeclass definitions imported from other packages).
  • I use the term 'dependently typed' loosely to mean DataKinds and friends.
  • I use literate Haskell Bird Style and all Haskell code is converted to code block with Haskell language annotation

TOC

  • Introduction - why I think this book is great and why I would like more people to read it

Notes about Part 1 of the Book.

Work-in-progress (reader stay away):

Notes about Part 2.

Notes about Part 3.