machinecell-1.0.1: 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

Eq Phase 
Show Phase 
Monoid Phase 

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.

Constructors

ProcessA 

Fields

step :: StepType a b c
 

Instances

ArrowApply a => Category (ProcessA a) 
(ArrowApply a, ArrowLoop a) => ArrowLoop (ProcessA a) 
ArrowApply a => ArrowChoice (ProcessA a) 
ArrowApply a => Arrow (ProcessA a) 
Arrow a => Profunctor (ProcessA a) 

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

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