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

FRP.Rhine.Reactimation.ClockErasure

Description

Translate clocked signal processing components to stream functions without explicit clock types.

This module is not meant to be used externally, and is thus not exported from Rhine.

Synopsis

Documentation

eraseClockClSF :: (Monad m, Clock m cl) => ClockProxy cl -> Time cl -> ClSF m cl a b -> MSF m (Time cl, Tag cl, a) b Source #

Run a clocked signal function as a monadic stream function, accepting the timestamps and tags as explicit inputs.

eraseClockSN :: (Monad m, Clock m cl, GetClockProxy cl) => Time cl -> SN m cl a b -> MSF m (Time cl, Tag cl, Maybe a) (Maybe b) Source #

Run a signal network as a monadic stream function.

Depending on the incoming clock, input data may need to be provided, and depending on the outgoing clock, output data may be generated. There are thus possible invalid inputs, which eraseClockSN does not gracefully handle.

eraseClockResBuf :: (Monad m, Clock m cl1, Clock m cl2, Time cl1 ~ Time cl2) => ClockProxy cl1 -> ClockProxy cl2 -> Time cl1 -> ResBuf m cl1 cl2 a b -> MSF m (Either (Time cl1, Tag cl1, a) (Time cl2, Tag cl2)) (Maybe b) Source #

Translate a resampling buffer into a monadic stream function.

The input decides whether the buffer is to accept input or has to produce output. (In the latter case, only time information is provided.)