Effect Handlers in Haskell, Evidently
summary
Presents a Haskell library called consort.ev.f that implements the evidence-passing translation from polymorphic algebraic effects to plain lambda calculus, built on a multi-prompt control monad and a GADT heterogeneous evidence vector. Uses STRef-backed implementation and detects tail-resumptive operations to evaluate resumptions in-place. Benchmarks show the library is about 5.5× slower than GHC-optimized raw ST loops but roughly 7× and 18× faster than two effect libraries (ee and evmt) in one test and about 1.5× faster on a realistic state benchmark.
AI-written summary · about
chapters (15)
- 0:00Computational Effects
- 1:23Contribution
- 2:09Overview
- 3:03Library Interface
- 5:52Operations
- 7:18Implementation
- 8:08Evidence Passing
- 10:26Multi-prompt Monad
- 11:14The Evidence Vector, or, The Context
- 12:51Effect Constraints (?)
- 14:10Type-level Equality
- 16:09Optimization
- 17:41Scoped Resumptions
- 18:46Benchmarks
- 23:05More in the Paper
related talks
26mEffect Handlers for Programmable Inference
01h 06mThe Evolution of Effects
33mRethinking Effects with Effect Systems
27mWith or Without You: Programming with Effect Exclusion
46mFunctional effects in perspective
39mDesigning software with effects systems
44mEffects, Algebraically yours ..
27mA General Fine-Grained Reduction Theory for Effect Handlers
