Hi Peter,

2007/6/25, peterv <[EMAIL PROTECTED]>:
I'm baffled. So using the Arrow abstraction (which I don't know yet) would
solve this problem? How can (perfectActionB x) be checked with without ever
executing performActionA which evaluates to x? This can only be done when x
is a constant expression no?

Arrows separate the action -- 'performActionB' -- from the argument --
'x', so you can look at the action before you have to compute the
argument to it. Of course, this means that you can no longer compute
the action from the argument -- that is, 'if x then performActionB
else performActionC' is something you can't directly do; you have to
use a choice primitive instead, which explicitly says "use one of
these two arrows depending on what value this argument is," which then
lets the library check these two arrows before actually applying them
to an argument.

- Benja
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to