Safe Haskell | Safe |
---|
- doEvent :: Scheduler s => Signal s v -> (Event v -> SchedulerIO s ()) -> Signal s v
- doNext :: Scheduler s => Signal s v -> (v -> SchedulerIO s ()) -> Signal s v
- doError :: Scheduler s => Signal s v -> (IOException -> SchedulerIO s ()) -> Signal s v
- doCompleted :: Scheduler s => Signal s v -> SchedulerIO s () -> Signal s v
- finally :: Scheduler s => Signal s v -> SchedulerIO s () -> Signal s v
- materialize :: Scheduler s => Signal s v -> Signal s (Event v)
- dematerialize :: Scheduler s => Signal s (Event v) -> Signal s v
- fromFoldable :: (Foldable t, Scheduler s) => t v -> Signal s v
- map :: Scheduler s => Signal s v -> (v -> w) -> Signal s w
- filter :: Scheduler s => Signal s v -> (v -> Bool) -> Signal s v
- take :: (Integral n, Scheduler s) => Signal s v -> n -> Signal s v
- drop :: (Integral n, Scheduler s) => Signal s v -> n -> Signal s v
- switch :: forall s v. Scheduler s => Signal s (Signal s v) -> Signal s v
- combine :: forall a b s. Scheduler s => Signal s a -> Signal s b -> Signal s (a, b)
- never :: Scheduler s => Signal s v
- empty :: Scheduler s => Signal s v
- data Signal s v
Documentation
doEvent :: Scheduler s => Signal s v -> (Event v -> SchedulerIO s ()) -> Signal s vSource
Runs a side-effecting action whenever the signal sends an event.
doNext :: Scheduler s => Signal s v -> (v -> SchedulerIO s ()) -> Signal s vSource
Runs a side-effecting action whenever the signal sends a value.
doError :: Scheduler s => Signal s v -> (IOException -> SchedulerIO s ()) -> Signal s vSource
Runs a side-effecting action whenever the signal sends an error.
doCompleted :: Scheduler s => Signal s v -> SchedulerIO s () -> Signal s vSource
Runs a side-effecting action when the signal completes.
finally :: Scheduler s => Signal s v -> SchedulerIO s () -> Signal s vSource
Runs a side-effecting action when the signal completes or errors.
materialize :: Scheduler s => Signal s v -> Signal s (Event v)Source
Brings every signal event into the monad, as a NextEvent
containing the event itself.
dematerialize :: Scheduler s => Signal s (Event v) -> Signal s vSource
The inverse of materialize
.
fromFoldable :: (Foldable t, Scheduler s) => t v -> Signal s vSource
Turns any Foldable
into a signal.
filter :: Scheduler s => Signal s v -> (v -> Bool) -> Signal s vSource
Filters the values of a signal according to a predicate.
take :: (Integral n, Scheduler s) => Signal s v -> n -> Signal s vSource
Returns a signal of the first n
elements.
drop :: (Integral n, Scheduler s) => Signal s v -> n -> Signal s vSource
Returns a signal without the first n
elements.
switch :: forall s v. Scheduler s => Signal s (Signal s v) -> Signal s vSource
Returns a signal that sends the values from the most recently sent signal.