Safe Haskell | None |
---|---|
Language | Haskell2010 |
Asynchronous signal networks are combinations of clocked signal functions (ClSF
s)
and matching ResamplingBuffer
s,
all satisfying the appropriate clock type constraints.
This module defines the SN
type,
combinators are found in a submodule.
Synopsis
- data SN m cl a b where
- Synchronous :: (cl ~ In cl, cl ~ Out cl) => ClSF m cl a b -> SN m cl a b
- Sequential :: (Clock m clab, Clock m clcd, Time clab ~ Time clcd, Time clab ~ Time (Out clab), Time clcd ~ Time (In clcd)) => SN m clab a b -> ResamplingBuffer m (Out clab) (In clcd) b c -> SN m clcd c d -> SN m (SequentialClock m clab clcd) a d
- Parallel :: (Clock m cl1, Clock m cl2, Time cl1 ~ Time (Out cl1), Time cl2 ~ Time (Out cl2), Time cl1 ~ Time cl2, Time cl1 ~ Time (In cl1), Time cl2 ~ Time (In cl2)) => SN m cl1 a b -> SN m cl2 a b -> SN m (ParallelClock m cl1 cl2) a b
Documentation
data SN m cl a b where Source #
An SN
is a side-effectful asynchronous signal network,
where input, data processing (including side effects) and output
need not happen at the same time.
The type parameters are:
m
: The monad in which side effects take place.cl
: The clock of the whole signal network. It may be sequentially or parallely composed from other clocks.a
: The input type. Input arrives at the rateIn cl
.b
: The output type. Output arrives at the rateOut cl
.
Synchronous :: (cl ~ In cl, cl ~ Out cl) => ClSF m cl a b -> SN m cl a b | A synchronous monadic stream function is the basic building block.
For such an |
Sequential :: (Clock m clab, Clock m clcd, Time clab ~ Time clcd, Time clab ~ Time (Out clab), Time clcd ~ Time (In clcd)) => SN m clab a b -> ResamplingBuffer m (Out clab) (In clcd) b c -> SN m clcd c d -> SN m (SequentialClock m clab clcd) a d | Two |
Parallel :: (Clock m cl1, Clock m cl2, Time cl1 ~ Time (Out cl1), Time cl2 ~ Time (Out cl2), Time cl1 ~ Time cl2, Time cl1 ~ Time (In cl1), Time cl2 ~ Time (In cl2)) => SN m cl1 a b -> SN m cl2 a b -> SN m (ParallelClock m cl1 cl2) a b | Two |