netwire-4.0.3: Flexible wire arrows for FRP

MaintainerErtugrul Soeylemez <>
Safe HaskellNone




Signal sampling wires.



keep :: Wire e m a aSource

Produce the most recent inputs in the given time window. The left input signal is the sample, the right input signal is the time window.

  • Complexity: O(n), where n the number of samples in the time window.
  • Depends: current instant.

Keep the input signal of the first instant forever.

Depends: first instant.

sample :: Wire e m (a, Time) aSource

Sample the left signal at discrete intervals given by the right signal.

  • Depends: instant of the last sample.

window :: Int -> Wire e m a (Seq a)Source

Produce up to the given number of most recent inputs.

  • Complexity: O(n), where n is the given argument.
  • Depends: current instant.

windowList :: Monad m => Int -> Wire e m a [a]Source

Same as fmap toList . window.