Monads need not be endofunctors

  • Authors:
  • Thorsten Altenkirch;James Chapman;Tarmo Uustalu

  • Affiliations:
  • School of Computer Science, University of Nottingham;Institute of Cybernetics, Tallinn University of Technology;Institute of Cybernetics, Tallinn University of Technology

  • Venue:
  • FOSSACS'10 Proceedings of the 13th international conference on Foundations of Software Science and Computational Structures
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce a generalisation of monads, called relative monads, allowing for underlying functors between different categories. Examples include finite-dimensional vector spaces, untyped and typed λ-calculus syntax and indexed containers. We show that the Kleisli and Eilenberg-Moore constructions carry over to relative monads and are related to relative adjunctions. Under reasonable assumptions, relative monads are monoids in the functor category concerned and extend to monads, giving rise to a coreflection between monads and relative monads. Arrows are also an instance of relative monads.