On Mon, Jun 6, 2011 at 4:05 PM, Casey McCann <syntaxgli...@gmail.com> wrote:

> ArrowChoice and ArrowApply are conceptually distinct and I expect
> there are instances of the former that have no possible instance for
> the latter. Branching vs. Monad I am much less certain of.
>

For a real-time or embedded DSL, or hardware modeling, you could easily
desire 'Branching' and limited 'Loop' classes while rejecting the full power
of Monads.


> some type that's not obviously equivalent to one of these definitions:
>   branchMonad mb t f = do { b <- mb; if b then t else f }
>   branchApplicative = liftA3 (\b t f -> if b then t else f)
>

Earlier forms of my reactive demand programming model [1] - before I
switched to arrows - would qualify. The model has limited side-effects (e.g.
power a camera on only when someone is observing it) so we cannot use
branchApplicative. The reactivity requires continuously weaving the two
branches over time and recombining the results, which is distinct from
branchMonad.

[1] http://awelonblue.wordpress.com/2011/05/21/comparing-frp-to-rdp/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to