Safe Haskell | None |
---|---|
Language | Haskell2010 |
- delay :: (ArrowApply a, Occasional b) => ProcessA a b b
- hold :: ArrowApply a => b -> ProcessA a (Event b) b
- accum :: ArrowApply a => b -> ProcessA a (Event (b -> b)) b
- edge :: (ArrowApply a, Eq b) => ProcessA a b (Event b)
- passRecent :: (ArrowApply a, Occasional o) => ProcessA a (AS e) (Event b) -> ProcessA a (e, AS b) o -> ProcessA a (AS e) o
- withRecent :: (ArrowApply a, Occasional o) => ProcessA a (e, AS b) o -> ProcessA a (e, AS (Event b)) o
- feedback1 :: (ArrowApply a, Occasional d) => ProcessA a (e, AS d) (c, d) -> ProcessA a (AS e) c
- feedback :: (ArrowApply a, Occasional d) => ProcessA a (e, AS d) b -> ProcessA a (e, AS b) (c, d) -> ProcessA a (AS e) c
- switch :: ArrowApply a => ProcessA a b (c, Event t) -> (t -> ProcessA a b c) -> ProcessA a b c
- dSwitch :: ArrowApply a => ProcessA a b (c, Event t) -> (t -> ProcessA a b c) -> ProcessA a b c
- rSwitch :: ArrowApply a => ProcessA a b c -> ProcessA a (b, Event (ProcessA a b c)) c
- drSwitch :: ArrowApply a => ProcessA a b c -> ProcessA a (b, Event (ProcessA a b c)) c
- kSwitch :: ArrowApply a => ProcessA a b c -> ProcessA a (b, c) (Event t) -> (ProcessA a b c -> t -> ProcessA a b c) -> ProcessA a b c
- dkSwitch :: ArrowApply a => ProcessA a b c -> ProcessA a (b, c) (Event t) -> (ProcessA a b c -> t -> ProcessA a b c) -> ProcessA a b c
- pSwitch :: (ArrowApply a, Traversable col) => (forall sf. b -> col sf -> col (ext, sf)) -> col (ProcessA a ext c) -> ProcessA a (b, col c) (Event mng) -> (col (ProcessA a ext c) -> mng -> ProcessA a b (col c)) -> ProcessA a b (col c)
- pSwitchB :: (ArrowApply a, Traversable col) => col (ProcessA a b c) -> ProcessA a (b, col c) (Event mng) -> (col (ProcessA a b c) -> mng -> ProcessA a b (col c)) -> ProcessA a b (col c)
- rpSwitch :: (ArrowApply a, Traversable col) => (forall sf. b -> col sf -> col (ext, sf)) -> col (ProcessA a ext c) -> ProcessA a (b, Event (col (ProcessA a ext c) -> col (ProcessA a ext c))) (col c)
- rpSwitchB :: (ArrowApply a, Traversable col) => col (ProcessA a b c) -> ProcessA a (b, Event (col (ProcessA a b c) -> col (ProcessA a b c))) (col c)
- peekState :: (ArrowApply a, ArrowState s a) => ProcessA a e s
- encloseState :: (ArrowApply a, ArrowAddState s a a') => ProcessA a b c -> s -> ProcessA a' b c
- tee :: ArrowApply a => ProcessA a (Event b1, Event b2) (Event (Either b1 b2))
- gather :: (ArrowApply a, Foldable f) => ProcessA a (f (Event b)) (Event b)
- sample :: ArrowApply a => ProcessA a (Event b1, Event b2) [b1]
- source :: (ArrowApply a, Foldable f) => f c -> ProcessA a (Event b) (Event c)
- fork :: (ArrowApply a, Foldable f) => ProcessA a (Event (f b)) (Event b)
- filter :: ArrowApply a => a o Bool -> ProcessA a (Event o) (Event o)
- echo :: ArrowApply a => ProcessA a (Event b) (Event b)
- anytime :: ArrowApply a => a b c -> ProcessA a (Event b) (Event c)
- par :: (ArrowApply a, Traversable col) => (forall sf. b -> col sf -> col (ext, sf)) -> col (ProcessA a ext c) -> ProcessA a b (col c)
- parB :: (ArrowApply a, Traversable col) => col (ProcessA a b c) -> ProcessA a b (col c)
- onEnd :: (ArrowApply a, Occasional b) => ProcessA a b (Event ())
- cycleDelay :: ArrowApply a => ProcessA a b b
AFRP-like utilities
delay :: (ArrowApply a, Occasional b) => ProcessA a b b Source
hold :: ArrowApply a => b -> ProcessA a (Event b) b Source
accum :: ArrowApply a => b -> ProcessA a (Event (b -> b)) b Source
passRecent :: (ArrowApply a, Occasional o) => ProcessA a (AS e) (Event b) -> ProcessA a (e, AS b) o -> ProcessA a (AS e) o infixr 9 Source
Deprecated: Use hold
instead
withRecent :: (ArrowApply a, Occasional o) => ProcessA a (e, AS b) o -> ProcessA a (e, AS (Event b)) o Source
Deprecated: Use hold
instead
feedback1 :: (ArrowApply a, Occasional d) => ProcessA a (e, AS d) (c, d) -> ProcessA a (AS e) c Source
Deprecated: Use Pump instead
Event version of loop (member of ArrowLoop
).
Yielding an event to feedback output always creates a new process cycle.
So be careful to make an infinite loop.
feedback :: (ArrowApply a, Occasional d) => ProcessA a (e, AS d) b -> ProcessA a (e, AS b) (c, d) -> ProcessA a (AS e) c infixr 9 Source
Deprecated: Use Pump instead
Artificially split into two arrow to use binary operator notation rather than banana brackets.
Switches
Switches inspired by Yampa library.
Signature is almost same, but collection requirement is not only Functor
,
but Traversable
. This is because of side effects.
switch :: ArrowApply a => ProcessA a b (c, Event t) -> (t -> ProcessA a b c) -> ProcessA a b c Source
dSwitch :: ArrowApply a => ProcessA a b (c, Event t) -> (t -> ProcessA a b c) -> ProcessA a b c Source
kSwitch :: ArrowApply a => ProcessA a b c -> ProcessA a (b, c) (Event t) -> (ProcessA a b c -> t -> ProcessA a b c) -> ProcessA a b c Source
dkSwitch :: ArrowApply a => ProcessA a b c -> ProcessA a (b, c) (Event t) -> (ProcessA a b c -> t -> ProcessA a b c) -> ProcessA a b c Source
pSwitch :: (ArrowApply a, Traversable col) => (forall sf. b -> col sf -> col (ext, sf)) -> col (ProcessA a ext c) -> ProcessA a (b, col c) (Event mng) -> (col (ProcessA a ext c) -> mng -> ProcessA a b (col c)) -> ProcessA a b (col c) Source
pSwitchB :: (ArrowApply a, Traversable col) => col (ProcessA a b c) -> ProcessA a (b, col c) (Event mng) -> (col (ProcessA a b c) -> mng -> ProcessA a b (col c)) -> ProcessA a b (col c) Source
rpSwitch :: (ArrowApply a, Traversable col) => (forall sf. b -> col sf -> col (ext, sf)) -> col (ProcessA a ext c) -> ProcessA a (b, Event (col (ProcessA a ext c) -> col (ProcessA a ext c))) (col c) Source
rpSwitchB :: (ArrowApply a, Traversable col) => col (ProcessA a b c) -> ProcessA a (b, Event (col (ProcessA a b c) -> col (ProcessA a b c))) (col c) Source
State arrow
peekState :: (ArrowApply a, ArrowState s a) => ProcessA a e s Source
encloseState :: (ArrowApply a, ArrowAddState s a a') => ProcessA a b c -> s -> ProcessA a' b c Source
Other utility arrows
tee :: ArrowApply a => ProcessA a (Event b1, Event b2) (Event (Either b1 b2)) Source
Make two event streams into one.
Actually gather
is more general and convenient;
... <- tee -< (e1, e2)
is equivalent to
... gather -< [Left <$ e1, Right $ e2]
gather :: (ArrowApply a, Foldable f) => ProcessA a (f (Event b)) (Event b) Source
Make multiple event channels into one. If simultaneous events are given, lefter one is emitted earlier.
source :: (ArrowApply a, Foldable f) => f c -> ProcessA a (Event b) (Event c) Source
Provides a source event stream.
A dummy input event stream is needed.
run af [...]
is equivalent to
run (source [...] >>> af) (repeat ())
fork :: (ArrowApply a, Foldable f) => ProcessA a (Event (f b)) (Event b) Source
Given an array-valued event and emit it's values as inidvidual events.
anytime :: ArrowApply a => a b c -> ProcessA a (Event b) (Event c) Source
Executes an action once per an input event is provided.
par :: (ArrowApply a, Traversable col) => (forall sf. b -> col sf -> col (ext, sf)) -> col (ProcessA a ext c) -> ProcessA a b (col c) Source
parB :: (ArrowApply a, Traversable col) => col (ProcessA a b c) -> ProcessA a b (col c) Source
onEnd :: (ArrowApply a, Occasional b) => ProcessA a b (Event ()) Source
cycleDelay :: ArrowApply a => ProcessA a b b Source
Observe a previous value of a signal. Tipically used with rec statement.