Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
Wire transformers for combining wires.
- class Arrow >~ => WContext (>~) where
- class Arrow >~ => WContextLimit t (>~) | >~ -> t where
- contextLimit :: Ord k => Wire e >~ (a, k) b -> Wire e >~ ((a, k), t) b
- class Arrow >~ => WDistribute (>~) where
- distribute :: [Wire e >~ a b] -> Wire e >~ a [b]
Context-sensitive evolution
class Arrow >~ => WContext (>~) whereSource
Make the given wire context-sensitive. The right signal is a context and the wire will evolve individually for each context.
- Depends: Like context wire (left), current instant (right).
- Inhibits: Like context wire.
class Arrow >~ => WContextLimit t (>~) | >~ -> t whereSource
Same as context
, but with a time limit. The third signal
specifies a maximum age. Contexts not used for longer than the
maximum age are forgotten.
- Depends: Like context wire (left), current instant (right).
- Inhibits: Like context wire.
contextLimit :: Ord k => Wire e >~ (a, k) b -> Wire e >~ ((a, k), t) bSource
(AdditiveGroup t, MonadClock t m, Ord t) => WContextLimit t (Kleisli m) |
Distribute
class Arrow >~ => WDistribute (>~) whereSource
Distribute the input signal over the given wires, evolving each of them individually. Discards all inhibited signals.
- Depends: as strict as the strictest subwire.
distribute :: [Wire e >~ a b] -> Wire e >~ a [b]Source
Monad m => WDistribute (Kleisli m) |