machinecell-1.3.0: Arrow based stream transducers

Safe HaskellNone
LanguageHaskell2010

Control.Arrow.Machine.Types

Synopsis

Documentation

data Phase Source

To get multiple outputs by one input, the Phase parameter is introduced.

Once a value Feeded, the machine is Sweeped until it Suspends.

Constructors

Feed 
Sweep 
Suspend 

Instances

type StepType a b c = a (Phase, b) (Phase, c, ProcessA a b c) Source

data ProcessA a b c Source

The stream transducer arrow.

To construct ProcessA instances, use Plan, arr, functions declared in Utils, or arrow combinations of them.

May use ArrowChoice and ArrowLoop instance too. but there is a limitation that loop cannot propagate Events to upstream. In such case, use feedback instead.

Constructors

ProcessA 

Fields

step :: StepType a b c
 

fit :: (Arrow a, Arrow a') => (forall p q. a p q -> a' p q) -> ProcessA a b c -> ProcessA a' b c Source

dimapStep :: Arrow a => (b -> c) -> (d -> e) -> StepType a c d -> StepType a b e Source

parStep :: (Arrow a, Arrow t, Monoid t4) => t (t2, t1) (t4, t5, a b c) -> t (t2, t3) (t4, t6, a b' c') -> t (t2, (t1, t3)) (t4, (t5, t6), a (b, b') (c, c')) Source

arrStep :: ArrowApply a => (b -> c) -> StepType a b c Source

compositeStep :: ArrowApply a => StepType a b d -> StepType a d c -> StepType a b c Source

Composition is proceeded by the backtracking strategy.

compositeStep' :: ArrowApply a => Phase -> StepType a b d -> StepType a d c -> StepType a b c Source