Monad Transformers and Modular Algebraic Effects: What Binds Them Together
For over two decades, monad transformers have been the main modular approach for expressing purely functional side-effects in Haskell. Yet, in recent years algebraic effects have emerged as an alternative whose popularity is still growing.
While the two approaches have been well-studied, there is still confusion about their relative merits and expressiveness, especially when it comes to their comparative modularity. This paper clarifies the connection between the two approaches—some of which is folklore—and spells out consequences that we believe should be better known.
We characterise a class of algebraic effects that is modular, and show how these correspond to a specific class of monad transformers. In particular, we show that our modular algebraic effects gives rise to monad transformers. Moreover, every monad transformer for algebraic operations gives rise to a modular effect handler.
Fri 23 AugDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
13:30 - 15:00 | |||
13:30 30mResearch paper | Monad Transformers and Modular Algebraic Effects: What Binds Them Together Haskell Tom Schrijvers KU Leuven, Maciej Piróg University of Wrocław, Nicolas Wu Imperial College London, Mauro Jaskelioff CONICET, Argentina | ||
14:00 30mResearch paper | Scoping Monadic Relational Database Queries Haskell Anton Ekblad Chalmers University of Technology |