machinecell-1.2.0: Arrow based stream transducers

Safe HaskellNone

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 cSource

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

parStep :: (Monoid t4, Arrow t, Arrow a) => 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 cSource

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

Composition is proceeded by the backtracking strategy.

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