A Practical Introduction to Eff in Haskell
summary
Builds a small Yesod/Persistent app and wires two Eff effects with two interpreters each so business logic stays pure while implementations vary. Uses freer-simple (and mentions polysemy for speed) and shows concrete test interpreters that feed inputs and capture outputs so logging and IO become mockable reader/writer effects. Demonstrates a price‑feed example with Postgres + cache interpreters reused together, measures that monadic binds can be ~20–35× slower but the approach works and simplifies testing.
AI-written summary · about
chapters (42)
- 0:00Introduction
- 1:00Effects Modeling
- 1:34Requirements Thrash
- 3:07Handwave
- 3:31Eff in Haskell
- 3:59Testing
- 6:27Polymorphic
- 6:48Monad
- 7:15Parameterization
- 8:21Type Signatures
- 9:29IOU
- 10:01Domain Effects
- 11:37How do we do this
- 12:20What libraries will help
- 13:00Minimum Viable FF effect
- 14:53Defining lowercase functions
- 16:23Writing the business logic
- 17:22Writing the interpreter
- 18:20The type signature
- 18:50Natural transformation
- 19:14Typelevel list
- 20:28Console to IO
- 21:05What about testing
- 22:09Hedgehog
- 22:42Controlling Interpretations
- 24:13Reinterpret
- 24:40Runreader
- 25:57Peer Unit
- 26:48What Weve Done
- 27:30Can We Do This
- 28:14RealLife Example
- 28:31Problem Statement
- 29:35Business Logic
- 30:14Question Marks
- 31:03Interpreter
- 32:39Reader IO
- 33:20CI Pipeline
- 34:09Reader Effect
- 35:43Cache
- 38:21Why not
- 39:34MTL
- 40:25Pure Script
related talks
25mScale By The Bay 2018 Unconference: Joe Kachmar
28mLightweight Testing of Persistent Amortized Time Complexity in the Credit Monad
38mSide Effects are The Complexity Iceberg
52mProgramming and Math
38mSide Effects are a Public API
41mYesterday's Cargo
28mLanguage Support for Property-Based Testing
44mMonads for Testers
