Free monads from scratch is a talk about Free monads, their motivation, their use cases for "real-world applications", and their implementation. It is mostly based on Wouter Swierstra's paper, Data Types à la carte.
The implementations in this repository are solely meant for educational purposes. They are neither stack-safe nor very performant, and shouldn't be used in production. If you want the awesomeness of Free monads for your application, please use one of the widely-available implementations.
presentation.md
is the source for the slideshow, generated using Decksetscala-samples
is a sbt project with several modules:- The
data-types-a-la-carte
module contains a Free monad implementation loosely based on Data types à la carte - The
cats-free-monads
module contains examples of usingcats-free
to structure programs
- The
- Similarly,
haskell-samples
is a stack project with several packages- The
data-types-a-la-carte
package contains a Free monad implementation loosely based on Data types à la carte - The
free-package
package contains examples of usingfree
to structure programs
- The
This talk wouldn't have been possible without the work of these amazing people:
- Cats contributors for their work on the
cats-free
module, among everything else. - James Haydon with his article Free monads for cheap interpreters
- Edward A. Kmett and contributors for the free Haskell package
- Adam Rosien with his article, What is an effect which provides an excellent introduction to effects, and a nice motivation for Free monads
- Wouter Swierstra with his paper, Data types à la carte which provides the reference implementation for Free monads, on which this presentation's code is mostly based.
- E-mail: hey [at] guillaumebogard [dot] dev
- Homepage: guillaumebogard.dev
- Twitter: @bogardguillaume