SodiumFRP / sodium

Sodium - Functional Reactive Programming (FRP) Library for multiple languages
http://sodium.nz/
Other
851 stars 140 forks source link

Recent change in the Haskell version of `updates` breaks old program. #55

Closed stevana closed 9 years ago

stevana commented 9 years ago

I've noticed that the following change to updates, https://github.com/SodiumFRP/sodium/commit/20e5428ccff38e88775ec1ab993dac85c504d814 by @pyrtsa , causes a program of mine to become unresponsive.

For some time now, I've simply constrained away the latest sodium package (0.11.0.3) in my cabal file -- thereby avoiding the above change. However, as GHC 7.10.1 doesn't build sodium-0.11.0.2, it's perhaps time to deal with this in a more direct way.

I wonder: is this change necessary, and if so is it possible to get the old behaviour back somehow? Cheers.

pyrtsa commented 9 years ago

I don't think I'm educated enough to comment on the revert or suggest a better fix.

But I've started to think it'd be better not to have updates defined for Behaviours in the first place, and instead pair up the Event and its held Behaviour into a new type (which the Reflex FRP library calls Dynamic). I think that keeps the continuous-time semantics of Behaviour cleaner.

the-real-blackh commented 9 years ago

Oh dear - sorry I haven't been responsive. I didn't get notified for some reason.

To answer your question, yes, this change to the way updates behaves is necessary to comply with the denotational semantics, which I have now (finally) written up. There can't be any more than one change to a Behavior in a single transaction.

the-real-blackh commented 9 years ago

If this is still a problem, please re-open and post a test case.