[Haskell-cafe] Practical Haskell question.

Henning Thielemann lemming at henning-thielemann.de
Mon Jun 25 04:58:16 EDT 2007


On Mon, 25 Jun 2007, Tomasz Zielonka wrote:

> On Mon, Jun 25, 2007 at 10:29:14AM +0200, Henning Thielemann wrote:
> > Imagine all performActions contain their checks somehow. Let
> > performActionB take an argument.
> >
> > >  do
> > >    x <- performActionA
> > >    y <- performActionB x
> > >    z <- performActionC
> > >    return $ calculateStuff x y z
> >
> > Now performActionB and its included check depend on x. That is, the check
> > relies formally on the result of performActionA and thus check B must be
> > performed after performActionA.
>
> IIUC, this limitation of Monads was one of the reasons why John Hughes
> introduced the new Arrow abstraction.

How would this problem be solved using Arrows?


More information about the Haskell-Cafe mailing list