Effect handlers allow programmers to model and compose computational
effects modularly. Effect systems statically guarantee that all
effects are handled. Several recent practical effect systems are
based on either row polymorphism or capabilities. However, there
remains a gap in understanding the precise relationship between effect
systems with such disparate foundations. The main difficulty is that
in both row-based and capability-based systems, effect tracking is
typically entangled with other features such as functions.
We propose a uniform framework for encoding, analysing, and comparing
effect systems. Our framework exploits and generalises modal effect
types, a recent novel effect system which decouples effect tracking
from functions via modalities. Modalities offer fine-grained control
over when and how effects are tracked, enabling us to express
different strategies for effect tracking. We give encodings as macro
translations from existing row-based and capability-based effect
systems into our framework and show that these encodings preserve
types and semantics. Our encodings reveal the essence of effect
tracking mechanisms in different effect systems, enable a direct
analysis on their differences, and provide practical insights on
language design.
Fri 16 JanDisplayed time zone: Brussels, Copenhagen, Madrid, Paris change
14:00 - 15:40 | Monads and EffectsPOPL at Dortoirs Chair(s): Henning Urbat Friedrich-Alexander-University Erlangen-Nürnberg | ||
14:00 25mTalk | An Equational Axiomatization of Dynamic Threads via Algebraic Effects: Presheaves on Finite Relations, Labelled Posets, and Parameterized Algebraic TheoriesDistinguished Paper POPL Ohad Kammar University of Edinburgh, Jack Liell-Cock University of Oxford, Sam Lindley University of Edinburgh, Cristina Matache University of Edinburgh, Sam Staton University of Oxford DOI | ||
14:25 25mTalk | Handling Higher-Order Effectful Operations with Judgemental Monadic Laws POPL DOI | ||
14:50 25mTalk | Rows and Capabilities as Modal Effects POPL DOI | ||
15:15 25mTalk | The Relative Monadic Metalanguage POPL Jack Liell-Cock University of Oxford, Zev Shirazi University of Oxford, Sam Staton University of Oxford DOI | ||