RxHaskell-0.2: Reactive Extensions for Haskell

Safe HaskellSafe

Signal.Scheduled

Synopsis

Documentation

start :: Scheduler s => s -> (Subscriber s v -> SchedulerIO s ()) -> IO (Signal s v)Source

Starts a signal which executes action on s.

subscribeOn :: forall s v. Scheduler s => Signal s v -> s -> Signal s vSource

Returns a signal which subscribes to sig on scheduler sch.

deliverOn :: forall s t v. (Scheduler s, Scheduler t) => Signal s v -> s -> t -> Signal t vSource

Returns a signal which subscribes to sig on scheduler schA and delivers its events onto scheduler schB.

first :: forall s v. Scheduler s => Signal s v -> SchedulerIO s (Event v)Source

Subscribes to sig and synchronously waits for an event.

class Scheduler s Source

Represents a queue of IO actions which can be executed in FIFO order.

data SchedulerIO s a Source

An IO computation that must be performed in a scheduler of type s.

Instances

Scheduler s => Monad (SchedulerIO s) 
Functor (SchedulerIO s) 
Scheduler s => Applicative (SchedulerIO s) 
Scheduler s => MonadIO (SchedulerIO s) 
Show v => Show (SchedulerIO BackgroundScheduler v) 
Show v => Show (SchedulerIO MainScheduler v)

Unsafely executes a SchedulerIO action and shows the result. This is for DEBUGGING PURPOSES ONLY.

data Signal s v Source

A signal which will send values of type v on a scheduler of type s.