Safe Haskell | None |
---|---|
Language | Haskell2010 |
The type of a complete Rhine program: A signal network together with a matching clock value.
Documentation
A Rhine
consists of a SN
together with a clock of matching type cl
.
It is a reactive program, possibly with open inputs and outputs.
If the input and output types a
and b
are both ()
,
that is, the Rhine
is "closed",
then it is a standalone reactive program
that can be run with the function flow
.
Otherwise, one can start the clock and the signal network jointly as a monadic stream function,
using eraseClock
.
Instances
GetClockProxy cl => ToClockProxy (Rhine m cl a b) Source # | |
Defined in FRP.Rhine.Type toClockProxy :: Rhine m cl a b -> ClockProxy (Cl (Rhine m cl a b)) Source # | |
type Cl (Rhine m cl a b) Source # | |
Defined in FRP.Rhine.Type |
eraseClock :: (Monad m, Clock m cl, GetClockProxy cl) => Rhine m cl a b -> m (MSF m a (Maybe b)) Source #
Start the clock and the signal network, effectively hiding the clock type from the outside.
Since the caller will not know when the clock
ticks,
the input In
cla
has to be given at all times, even those when it doesn't tick.