Arrows, like Monads, are Monoids

  • Authors:
  • Chris Heunen;Bart Jacobs

  • Affiliations:
  • Institute for Computing and Information Sciences, Radboud University, Nijmegen, the Netherlands;Institute for Computing and Information Sciences, Radboud University, Nijmegen, the Netherlands

  • Venue:
  • Electronic Notes in Theoretical Computer Science (ENTCS)
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Monads are by now well-established as programming construct in functional languages. Recently, the notion of ''Arrow'' was introduced by Hughes as an extension, not with one, but with two type parameters. At first, these Arrows may look somewhat arbitrary. Here we show that they are categorically fairly civilised, by showing that they correspond to monoids in suitable subcategories of bifunctors C^o^pxC-C. This shows that, at a suitable level of abstraction, arrows are like monads - which are monoids in categories of functors C-C. Freyd categories have been introduced by Power and Robinson to model computational effects, well before Hughes' Arrows appeared. It is often claimed (informally) that Arrows are simply Freyd categories. We shall make this claim precise by showing how monoids in categories of bifunctors exactly correspond to Freyd categories.