grapefruit-frp- Functional Reactive Programming core

Safe HaskellNone




This module is about continuous signals.

For a general introduction to signals, see the documentation of FRP.Grapefruit.Signal.


Continuous signal type

data CSignal era val Source

The type of continuous signals.

A continuous signal denotes a mapping from times to values. You can think of CSignal era val as being equivalent to Time era -> val where Time era is the type of all times of the given era.

Continuous signals are used to describe continuously changing values. They are also used for values changing at discrete times if there is no possibility of being notified about such changes. If there is a notification mechanism then segemented signals, provided by FRP.Grapefruit.Signal.Segmented, should be used.


fromSSignal :: SSignal era val -> CSignal era valSource

Converts a segmented signal into a continous signal, dropping the information about update points.


producer :: IO val -> Producer CSignal valSource

Converts a value read action into a continuous signal producer.

The producer producer readVal produces a continuous signal whose current value is determined by executing readVal.