Arrow Libraries (arrows package)ParentContentsIndex
Control.Arrow.Transformer.Automaton
Portability non-portable (multi-parameter type classes)
Stability experimental
Maintainer ross@soi.city.ac.uk
Description
Simple Mealy-style automata.
Synopsis
data Automaton a b c
runAutomaton :: (ArrowLoop a, ArrowApply a) => Automaton a (e, b) c -> a (e, Stream b) (Stream c)
module Control.Arrow.Operations
module Control.Arrow.Transformer
Documentation
data Automaton a b c
An arrow type comprising Mealy-style automata, each step of which is is a computation in the original arrow type.
Instances
Arrow a => Arrow (Automaton a)
ArrowAddReader r a a' => ArrowAddReader r (Automaton a) (Automaton a')
ArrowAddReader r a a' => ArrowAddReader r (Automaton a) (Automaton a')
ArrowAddState r a a' => ArrowAddState r (Automaton a) (Automaton a')
ArrowAddState r a a' => ArrowAddState r (Automaton a) (Automaton a')
(ArrowLoop a, ArrowApply a) => ArrowAddStream (Automaton a) a
ArrowAddWriter w a a' => ArrowAddWriter w (Automaton a) (Automaton a')
ArrowAddWriter w a a' => ArrowAddWriter w (Automaton a) (Automaton a')
ArrowChoice a => ArrowChoice (Automaton a)
ArrowLoop a => ArrowCircuit (Automaton a)
ArrowError r a => ArrowError r (Automaton a)
ArrowLoop a => ArrowLoop (Automaton a)
ArrowPlus a => ArrowPlus (Automaton a)
ArrowReader r a => ArrowReader r (Automaton a)
ArrowState s a => ArrowState s (Automaton a)
Arrow a => ArrowTransformer Automaton a
ArrowWriter w a => ArrowWriter w (Automaton a)
ArrowZero a => ArrowZero (Automaton a)
runAutomaton :: (ArrowLoop a, ArrowApply a) => Automaton a (e, b) c -> a (e, Stream b) (Stream c)

Encapsulating an automaton by running it on a stream of inputs, obtaining a stream of outputs.

Typical usage in arrow notation:

	proc p -> do
		...
		ys <- (|runAutomaton (\x -> ...)|) xs

Here xs refers to the input stream and x to individual elements of that stream. ys is bound to the output stream.

module Control.Arrow.Operations
module Control.Arrow.Transformer
Produced by Haddock version 0.5