machinecell-1.3.1: Arrow based stream transducers

Safe HaskellNone
LanguageHaskell2010

Control.Arrow.Machine.Running

Contents

Synopsis

Run at once.

run :: ArrowApply a => ProcessA a (Event b) (Event c) -> a [b] [c] Source

Run a machine.

runOn :: (ArrowApply a, Monoid r) => (c -> r) -> ProcessA a (Event b) (Event c) -> a [b] r Source

Run a machine with results concatenated in terms of a monoid.

run_ :: ArrowApply a => ProcessA a (Event b) (Event c) -> a [b] () Source

Run a machine discarding all results.

Run step-by-step.

data ExecInfo fa Source

Represents return values and informations of step executions.

Constructors

ExecInfo 

Fields

yields :: fa
 
hasConsumed :: Bool
 
hasStopped :: Bool
 

Instances

Eq fa => Eq (ExecInfo fa) 
Show fa => Show (ExecInfo fa) 
Alternative f => Monoid (ExecInfo (f a)) 

stepRun :: ArrowApply a => ProcessA a (Event b) (Event c) -> a b (ExecInfo [c], ProcessA a (Event b) (Event c)) Source

Execute until an input consumed and the machine suspended.

stepYield :: ArrowApply a => ProcessA a (Event b) (Event c) -> a b (ExecInfo (Maybe c), ProcessA a (Event b) (Event c)) Source

Execute until an output produced.