rhine-1.4: Functional Reactive Programming with type-level clocks
Safe HaskellSafe-Inferred
LanguageHaskell2010

FRP.Rhine.ClSF.Upsample

Description

Utilities to run ClSFs at the speed of combined clocks when they are defined only for a constituent clock.

Synopsis

Documentation

upsampleAutomaton :: Monad m => b -> Automaton m a b -> Automaton m (Either arbitrary a) b Source #

An Automaton can be given arbitrary other arguments that cause it to tick without doing anything and replicating the last output.

upsampleR :: (Monad m, Time clL ~ Time clR) => b -> ClSF m clR a b -> ClSF m (ParallelClock clL clR) a b Source #

Upsample a ClSF to a parallel clock. The given ClSF is only called when clR ticks, otherwise the last output is replicated (with the given b as initialisation).

upsampleL :: (Monad m, Time clL ~ Time clR) => b -> ClSF m clL a b -> ClSF m (ParallelClock clL clR) a b Source #

Upsample a ClSF to a parallel clock. The given ClSF is only called when clL ticks, otherwise the last output is replicated (with the given b as initialisation).