The ReaderT Design Pattern (2017)
9 points by abhin4v
9 points by abhin4v
ReaderT over IO gets you pretty far! It gets you access to shared, read-only config as well as mutable shared state by having a TVar or some other mutable STM-backed slot in the reader.
But I've mostly moved on to effectful which is based on this exact pattern, but gives you more flexible effects and typing:
The
Effmonad it uses is essentially aReaderToverIOon steroids, allowing us to extend its environment with data types representing effects.