FRP - Release of reactive-banana version 0.4

I have released version 0.4.0.0 of my reactive-banana library on hackage.

Once again, I’ve improved the interaction with existing event-based frameworks. Namely, I’ve added a function

fromPoll :: IO a -> NetworkDescription (Behavior a)

that creates a behavior from mutable data by polling. For instance, you can now obtain the text contents of an edit widget as a behavior. I’m actually embarrassed that I forgot to include this function right from the start. :-)

While the core FRP model and semantics remain unchanged, I have also added a new data type Discrete, which denotes discrete time-varying values. It’s very similar to Behavior, except that it also provides an event changes that records when the value changes. This can be very useful when you want explicit control over updates, but the drawback is, of course, that you have to deal with yet another data type. See the documentation for more on the rationale.

Many thanks to the user Masse for highlighting these issues by asking questions on stackoverflow and to Conal Elliott for discussing the new Discrete data type with me.

Other changes include:

Comments

Some HTML formatting is allowed.