reactive-bacon-0.4.1: FRP (functional reactive programming) framework

Safe HaskellSafe-Inferred

Reactive.Bacon.Core

Synopsis

Documentation

class Observable s whereSource

Methods

(==>) :: s a -> (a -> IO ()) -> IO ()Source

(>>=!) :: IO (s a) -> (a -> IO ()) -> IO ()Source

data Event a Source

Constructors

Next a 
End 

Instances

Functor Event 
Eq a => Eq (Event a) 
Show a => Show (Event a) 

data HandleResult Source

Constructors

More 
NoMore 

class EventSource s whereSource

Methods

toEventStream :: s a -> EventStream aSource

Instances

toObserver :: (a -> IO ()) -> EventSink aSource

data Property a Source

Reactive property. Differences from EventStream: - addListener function must always deliver the latest known value to the new listener

So a Property is roughly an EventStream that stores its latest value so that it is always available for new listeners. Doesn't mean it has to be up to date if it has been without listeners for a while.

class PropertySource s whereSource

Methods

toProperty :: s a -> Property aSource

data PropertyEvent a Source

Constructors

Initial a 
Update a 
EndUpdate