Orchard, Dominic, Wadler, Philip, Eades, Harley (2020) Unifying graded and parameterised monads. Proceedings Eighth Workshop on Mathematically Structured Functiona Programming, MSFP@ETAPS 2020, Dublin, Ireland, 25th April 2020, . (KAR id:84635)
PDF
Publisher pdf
Language: English
This work is licensed under a Creative Commons Attribution 4.0 International License.
|
|
Download this file (PDF/385kB) |
Preview |
Request a format suitable for use with assistive technology e.g. a screenreader | |
Official URL: https://arxiv.org/abs/2001.10274v2 |
Abstract
Monads are a useful tool for structuring effectful features of computation such as state, non-determinism, and continuations. In the last decade, several generalisations of monads have been suggested which provide a more fine-grained model of effects by replacing the single type constructor of a monad with an indexed family of constructors. Most notably, graded monads (indexed by a monoid) model effect systems and parameterised monads (indexed by pairs of pre- and post-conditions) model program logics. This paper studies the relationship between these two generalisations of monads via a third generalisation. This third generalisation, which we call category-graded monads, arises by generalising a view of monads as a particular special case of lax functors. A category-graded monad provides a family of functors T f indexed by morphisms f of some other category. This allows certain compositions of effects to be ruled out (in the style of a program logic) as well as an abstract description of effects (in the style of an effect system). Using this as a basis, we show how graded and parameterised monads can be unified, studying their similarities and differences along the way.
Item Type: | Article |
---|---|
Divisions: | Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing |
Depositing User: | Dominic Orchard |
Date Deposited: | 30 Nov 2020 11:00 UTC |
Last Modified: | 25 Nov 2021 11:51 UTC |
Resource URI: | https://kar.kent.ac.uk/id/eprint/84635 (The current URI for this page, for reference purposes) |
- Link to SensusAccess
- Export to:
- RefWorks
- EPrints3 XML
- BibTeX
- CSV
- Depositors only (login required):