Designing software with effects systems
summary
Describes migrating a 7‑year Haskell codebase to an effects design using Polysemy with concrete steps: extract IO into effect types, change function signatures, write interpret/run interpreters, and layer interpreters (DB → pool → IO). Reports scale: an existing codebase had ~40 effects and ~100 interpreters, and four years of production use inform pragmatic choices like adding an ID effect then swapping to an atomic‑state interpreter for tests, plus how reordering or embedding effects fixes test vs runtime differences.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:06Speaker background
- 2:34Effect systems origins
- 3:39Monads and effects
- 5:57Monad stack challenges
- 7:00Live demo setup
- 8:57Refactor hardcoded I/O
- 13:42First effect type
- 15:53Writing effect interpreters
- 18:51Embedded effects handling
- 22:40Minimal effect sets
- 24:09Implementing interpreters
- 29:40Stateful effects like ID gen
- 33:23Adding effects to stacks
- 36:21Refactoring summary
- 37:29Q&A
related talks
33mRethinking Effects with Effect Systems
01h 06mThe Evolution of Effects
50mFunctional Programming with Effects
27mLimiting side-effects of applications at compile-time
46mFunctional effects in perspective
25mScale By The Bay 2018 Unconference: Joe Kachmar
14mFundamentalist Functional Programming
28mA Series of Unfortunate Effects
