CW 699
Tom Schrijvers, Maciej Piróg, Nicolas Wu, Mauro JaskelioffMonad transformers and modular algebraic effects: What binds them together
Abstract
Monads and algebraic effects are two alternative approaches for expressing purely functional side-effects. While the two approaches have been well-studied, there is still much confusion about their relative merits and expressiveness, especially when it comes to their comparative modularity. This paper clarifies the connection between the two approaches. In this paper we introduce the notion of modular algebraic effects, and show how these correspond to a specific class of monad transformers. In particular, we show that every modular algebraic effect gives rise to a monad transformer. Moreover, every monad transformer for algebraic operations gives rise to a modular effect handler. Finally, we illustrate the common ground of both approaches with an algebraic reformulation of callCC.
report.pdf (343K) / mailto: T. Schrijvers