Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
Control.Wire.Trans.Combine
Description
Wire transformers for combining wires.
- context :: forall a b e k (>~). (ArrowApply >~, ArrowChoice >~, Ord k) => Wire e >~ a b -> Wire e >~ (a, k) b
- contextLimit :: forall a b e k t (>~). (ArrowApply >~, ArrowClock >~, Num t, Ord k, Ord t, Time >~ ~ t) => Wire e >~ a b -> Wire e >~ ((a, k), t) b
- distribute :: ArrowApply >~ => [Wire e >~ a b] -> Wire e >~ a [b]
Context-sensitive evolution
context :: forall a b e k (>~). (ArrowApply >~, ArrowChoice >~, Ord k) => Wire e >~ a b -> Wire e >~ (a, k) bSource
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.
contextLimit :: forall a b e k t (>~). (ArrowApply >~, ArrowClock >~, Num t, Ord k, Ord t, Time >~ ~ t) => Wire e >~ a b -> Wire e >~ ((a, k), t) bSource
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.
Distribute
distribute :: ArrowApply >~ => [Wire e >~ a b] -> Wire e >~ a [b]Source
Distribute the input signal over the given wires, evolving each of them individually. Collects produced outputs.
Note: This wire transformer discards all inhibited signals.
- Depends: as strict as the strictest subwire.