[Haskell-cafe] Unambiguous choice implementation
bartosz at fpcomplete.com
Mon Jun 25 01:08:00 CEST 2012
I'm trying to understand Reactive Banana, but there isn't much
documentation to go about. How is RB positioned vis a vis Elliott (and then
there is the earlier Elliot and Hudak, and the later Elliot with the push
implementation and type classes). Do you have a toy applet that
demonstrates the use of Reactive Banana, something like Elliotts Bezier
editor, http://research.microsoft.com/pubs/69665/deop-tr.pdf ?
On Sunday, June 24, 2012 7:21:07 AM UTC-7, Heinrich Apfelmus wrote:
> Bartosz Milewski wrote:
> > I'm reading Conal Elliot's paper, Push-Pull FRP. At some point he needs
> > unambiguous choice operator, essentially to implement select: a future
> > waits for one of its future arguments to fire. His implementation of
> > creates two threads racing on a shared MVar. By his own admission, this
> > very inefficient. My question is, is there a better implementation?
> The thing about unambiguous choice is that it goes beyond the dynamic
> semantics of the Haskell language. To implement it, you either need a
> new evaluation model built into the compiler, or you have to fake it
> somehow and that is likely to be inefficient.
> Also note that Conal's paper describes just one possible implementation
> of FRP. My reactive-banana library uses an implementation that doesn't
> require unambiguous choice at all. For a basic model, see
> The key idea is to keep all events synchronous and to reify some cases
> of "this event does not occur right now".
> Best regards,
> Heinrich Apfelmus
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe