The categorical notion of monad, used by Moggi to structure denotational de
scriptions, has proved to be a powerful tool for structuring combinator lib
raries. Moreover, the monadic programming style provides a convenient synta
x for many kinds of computation, so that each library defines a new sublang
uage.
Recently, several workers have proposed a generalization of monads, called
variously "arrows" or Freyd-categories. The extra generality promises to in
crease the power, expressiveness and efficiency of the embedded approach, b
ut does not mesh as well with the native abstraction and application. Defin
itions are typically given in a point-free style, which is useful for provi
ng general properties, but can be awkward for programming specific instance
s.
In this paper we define a simple extension to the functional language Haske
ll that makes these new notions of computation more convenient to use. Our
language is similar to the monadic style, and has similar reasoning propert
ies. Moreover, it is extensible, in the sense that new combining forms can
be defined as expressions in the host language.