Safe Haskell | None |
---|---|

Language | Haskell98 |

Defines basic signal functions, and elementary ways of altering them.

This module defines very basic ways of creating and modifying signal functions. In particular, it defines ways of creating constant output producing SFs, and SFs that just pass the signal through unmodified.

It also defines ways of altering the input and the output signal only by inserting one value in the signal, or by transforming it.

# Basic signal functions

Identity: identity = arr id

Using `identity`

is preferred over lifting id, since the arrow combinators
know how to optimise certain networks based on the transformations being
applied.

constant :: b -> SF a b Source #

Identity: constant b = arr (const b)

Using `constant`

is preferred over lifting const, since the arrow combinators
know how to optimise certain networks based on the transformations being
applied.

## Initialization

(-->) :: b -> SF a b -> SF a b infixr 0 Source #

Initialization operator (cf. Lustre/Lucid Synchrone).

The output at time zero is the first argument, and from that point on it behaves like the signal function passed as second argument.

(-:>) :: b -> SF a b -> SF a b infixr 0 Source #

Output pre-insert operator.

Insert a sample in the output, and from that point on, behave like the given sf.

(>--) :: a -> SF a b -> SF a b infixr 0 Source #

Input initialization operator.

The input at time zero is the first argument, and from that point on it behaves like the signal function passed as second argument.

(-=>) :: (b -> b) -> SF a b -> SF a b infixr 0 Source #

Transform initial output value.

Applies a transformation `f`

only to the first output value at
time zero.