[Haskell-cafe] a general question on Arrows

Steve Lihn stevelihn at gmail.com
Wed Feb 13 19:50:55 EST 2008

In John Hughes' paper [1], Programming with Arrows, p. 20,

"The truly interesting arrow types are those which do not
correspond to a monad, because it is here that arrows give us real
extra generality.
Since we know that stream functions cannot be represented as a monad,
then they are one of these "interesting" arrow types. So are the arrows used for
functional reactive programming, for building GUIs, and the arrows for discrete
event simulation we present in Section 5. And since these arrows
cannot be represented
by a monad, we know that they cannot support a sensible definition of
app either."

He described a few things that "cannot" be represented as a monad, they are:
1. Stream
2. FRP
3. GUI (request/response?)
4. Event Driven System (like circuits, robots?)

My first question is:
Are they "absolutely" outside of the realm of function + monad,
therefore, arrows are indispensable? Or it is simply because the
haskell program would be very cumbersome without arrows in these
areas? (I mean without utilizing FFI to rescue.)

The second question is:
Other than the 4 areas above, are there more? Just want to get a sense
of how useful arrows are. Not really a theoretical question.


[1] http://www.cs.chalmers.se/~rjmh/afp-arrows.pdf

More information about the Haskell-Cafe mailing list