Programming with Arrows

John Hughes (Chalmers University of Technology)

Arrows in Haskell provide an abstract data type interface for function-like types, which can be implemented in many different ways. Since arrows also represent a kind of computation, they are related to monads, but can represent a wider range of kinds of computation. Arrows have proved particularly useful to represent processes, which map an input channel to an output channel, something which is hard to represent as a monad at all. In these lectures I will introduce arrows, explain the language support which GHC now provides for them, and illustrate some of the things arrows can implement by examples of self-optimising computations and discrete event simulation.


Last Update 2 July 2004