Rows and Capabilities as Modal Effects
Wenhao Tang, Sam Lindley

TL;DR
This paper introduces a unified framework using modal effect types to analyze, compare, and encode effect systems based on rows and capabilities, clarifying their relationships and guiding language design.
Contribution
It proposes a general modal effect type framework that decouples effect tracking from functions and provides encodings for existing effect systems, revealing their core mechanisms.
Findings
Encodings preserve types and semantics.
Framework clarifies differences between effect systems.
Provides practical insights for language design.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsProbabilistic and Robust Engineering Design · Product Development and Customization
