Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
Wire transformers for sampling wires.
Sampling
class Arrow >~ => WHold (>~) whereSource
Hold signals.
hold :: Wire e >~ a b -> Wire e >~ a bSource
Keeps the latest produced value.
- Depends: Like argument wire.
- Inhibits: Until first production.
holdWith :: b -> Wire e >~ a b -> Wire e >~ a bSource
Keeps the latest produced value. Produces the argument value until the argument wire starts producing.
- Depends: Like argument wire.
class Arrow >~ => WSample t (>~) | >~ -> t whereSource
Samples the given wire at discrete time intervals. Only runs the input through the wire, when the next sampling interval starts.
- Depends: Current instant (left), like argument wire at sampling intervals (right).
- Inhibits: Starts inhibiting when argument wire inhibits. Keeps inhibiting until next sampling interval.
(AdditiveGroup t, MonadClock t m, Ord t) => WSample t (Kleisli m) |
class Arrow >~ => WSampleInt (>~) whereSource
Samples the given wire at discrete frame count intervals. Only runs the input through the wire, when the next sampling interval starts.
- Depends: Current instant (left), like argument wire at sampling intervals (right).
- Inhibits: Starts inhibiting when argument wire inhibits. Keeps inhibiting until next sampling interval.
Monad m => WSampleInt (Kleisli m) |