Flexible presentations of graded monads
A large class of monads used to model computational effects have natural presentations by operations and equations, for example, the list monad can be presented by a constant and a binary operation subject to unitality and associativity. Graded monads are a generalization of monads that enable us to...
Saved in:
Published in | Proceedings of ACM on programming languages Vol. 6; no. ICFP; pp. 902 - 930 |
---|---|
Main Authors | , , , |
Format | Journal Article |
Language | English |
Published |
29.08.2022
|
Online Access | Get full text |
ISSN | 2475-1421 2475-1421 |
DOI | 10.1145/3547654 |
Cover
Summary: | A large class of monads used to model computational effects have natural presentations by operations and equations, for example, the list monad can be presented by a constant and a binary operation subject to unitality and associativity. Graded monads are a generalization of monads that enable us to track quantitative information about the effects being modelled. Correspondingly, a large class of graded monads can be presented using an existing notion of graded presentation. However, the existing notion has some deficiencies, in particular many effects do not have natural graded presentations.
We introduce a notion of flexibly graded presentation that does not suffer from these issues, and develop the associated theory. We show that every flexibly graded presentation induces a graded monad equipped with interpretations of the operations of the presentation, and that all graded monads satisfying a particular condition on colimits have a flexibly graded presentation. As part of this, we show that the usual algebra-preserving correspondence between presentations and a class of monads transfers to an algebra-preserving correspondence between flexibly graded presentations and a class of flexibly graded monads. |
---|---|
ISSN: | 2475-1421 2475-1421 |
DOI: | 10.1145/3547654 |