Skip to content

Instantly share code, notes, and snippets.

View m-col's full-sized avatar
🐢

Matt Colligan m-col

🐢
View GitHub Profile
@omnibs
omnibs / three-layer-haskell-cake.hs
Created September 18, 2021 14:13
ReaderT Pattern example
{-
This is a port of https://jordanmartinez.github.io/purescript-jordans-reference-site/content/21-Hello-World/05-Application-Structure/src/02-MTL/32-The-ReaderT-Capability-Design-Pattern.html
There was no simple, working example of the ReaderT pattern in Haskell
-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
import qualified Control.Monad.IO.Class as MonadIO
import qualified Control.Monad.Reader as Reader
import Prelude