Principled error handling - Beyond MonadError
summary
Argues MonadError is insufficient and introduces an ErrorControl abstraction that separates a fallible F from an infallible G with a primitive controlError (F a, E→G a) : G a plus derived ops like intercept, trial, accept and assure, with homomorphism laws to prevent nested attempts. Gives concrete instances: Either/ID, EitherT, StateT, IO ↔ uIO ≅ IO of Either, BIO/VIO (UIO of Validated) to switch short‑circuiting vs error accumulation, and shows how to map transformers to a safe infallible context.
AI-written summary · about
chapters (17)
- 0:00Intro
- 2:19Simple error handling - Either
- 5:41Abstracting to MonadError
- 6:33MonadError - polymorphic programs
- 7:43MonadError - instances
- 11:57MonadError - a closer look
- 14:44Let's try better!
- 18:53ErrorControl - laws
- 20:24ErrorControl - derived functions
- 25:16ErrorControl - instances - Either
- 26:27Error Control - instances - 10
- 29:53Error Control - instances - Eithert
- 31:12Error Control - instances - Statet
- 32:46ErrorControl - instances - BIO
- 34:55Alternatives?
- 36:44Conclusions
- 37:34Bonus Slides
related talks
39mFunctional Error Handling with Cats
44mIO monad & Error management: From Exceptions to Cats MTL
43mFunctional Error Handling
24mUsing Monad Transformers without understanding them
26mUP YOUR MTL GAME WITH CLASSY OPTICS
25mTYPE-SAFE ERROR HANDLING IN THE AGE OF DOTTY
19mFinding the Free Way
16mGetting started with EitherT
