rhine-0.5.1.0: Functional Reactive Programming with type-level clocks

Safe HaskellNone
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

upsampleMSF :: Monad m => b -> MSF m a b -> MSF m (Either arbitrary a) b Source #

An MSF 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 m 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 m 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).