22
views
0
recommends
+1 Recommend
0 collections
    0
    shares
      • Record: found
      • Abstract: found
      • Article: found
      Is Open Access

      Unifying graded and parameterised monads

      Preprint
      , ,

      Read this article at

      Bookmark
          There is no author summary for this article yet. Authors can add summaries to their articles on ScienceOpen to make them more accessible to a non-specialist audience.

          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 \(\mathsf{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.

          Related collections

          Author and article information

          Journal
          28 January 2020
          Article
          2001.10274
          2fa1db95-d052-40fc-b896-e136503a608c

          http://creativecommons.org/licenses/by/4.0/

          History
          Custom metadata
          16B50
          cs.PL math.CT

          Programming languages,General mathematics
          Programming languages, General mathematics

          Comments

          Comment on this article