RxHaskell-0.2: Reactive Extensions for Haskell

Safe HaskellSafe




data Subscriber s v Source

Receives events from a signal with values of type v and running in a scheduler of type s.

Note that s refers to the scheduler that events must be sent on. Events are always sent synchronously, regardless of s.



:: Scheduler s 
=> (Event v -> SchedulerIO s ())

An action to run when each event is received.

-> IO (Subscriber s v)

The constructed subscriber.

Constructs a subscriber.

send :: forall s v. Scheduler s => Subscriber s v -> Event v -> SchedulerIO s ()Source

Synchronously sends an event to a subscriber.

data Event v Source

Represents an event that a signal might send.

Signals may send any number of NextEvents, followed by one ErrorEvent or CompletedEvent.


NextEvent v

A value v in the monad.

ErrorEvent IOException

Sent when an error or exception occurs in the signal. Outside of the monad.


Sent when the signal completes successfully. Outside of the monad.


Eq v => Eq (Event v) 
Show v => Show (Event v)