grapefruit-frp-0.1.0.2: Functional Reactive Programming core

Safe HaskellNone

FRP.Grapefruit.Signal.Continuous

Contents

Description

This module is about continuous signals.

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

Synopsis

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.

Conversion

fromSSignal :: SSignal era val -> CSignal era valSource

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

Connectors

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.