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

FRP.Rhine.ResamplingBuffer.FIFO

Description

Different implementations of FIFO buffers.

Synopsis

FIFO (first-in-first-out) buffers

fifoUnbounded :: Monad m => ResamplingBuffer m cl1 cl2 a (Maybe a) Source #

An unbounded FIFO buffer. If the buffer is empty, it will return Nothing.

fifoBounded :: Monad m => Int -> ResamplingBuffer m cl1 cl2 a (Maybe a) Source #

A bounded FIFO buffer that forgets the oldest values when the size is above a given threshold. If the buffer is empty, it will return Nothing.

fifoWatch :: Monad m => ResamplingBuffer m cl1 cl2 a (Maybe a, Int) Source #

An unbounded FIFO buffer that also returns its current size.