Re: [Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

On Mon, Jun 6, 2011 at 4:05 PM, Casey McCann
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/
participants (1)
-
David Barbour