Associated Effects: Flexible Abstractions for Effectful Programming
summary
Introduces "associated effects": type-class-level effect variables that let each instance pick its concrete effect, solving cases like total vs partial division (float = pure, int = throws), mutable vs immutable folds (region effect vs pure), and differing reader effects. Implements the feature in Flix implementation, refactors the standard library (changes are small), adds associated effects to 11 type classes and unlocks 28 new instances, provides a formal calculus and reproducible artifacts.
AI-written summary · about
chapters (11)
- 0:00Effect systems and type classes
- 1:06Overloading arithmetic operators
- 3:11Partial vs total functions
- 3:52Mutable vs immutable collections
- 5:19Incompatible effects in streams
- 6:22Challenges in effect abstraction
- 7:03Associated effects solution
- 8:47Implementation in Flick
- 10:35Formal calculus and library
- 10:56Conclusion and future
- 11:16Q&A
related talks
15mEffects as Capabilities: Effect Handlers and Lightweight Effect Polymorphism
51mEffects: to be or not to be?
15mQualified Types with Boolean Algebras
32mHigh-Level Effect Handlers in C++
54mRevisiting the Evolution of Effects (Invited Talk)
15mLatent Effects for Reusable Language Components
29mCoeffects for Sharing and Mutation
41mAn Introduction to Functional Imperative Programming in Flix
