Three Layer Haskell Cake

Three Layer Haskell Cake is the blog post by Matthew Parsons explaining one of the widely used Haskell application architectures using monad transformers, mtl and ReaderT.

Synopsis

We design our application in three layers.

  • Layer 1 is low-level and uses ReaderT to hold our application state.
  • Layer 3 contains the actual business logic, with pure functions (no IO)
  • Layer 2 glues the two layers together using mtl style classes

Implementation specifics