|Portability||non-portable (multi-parameter type classes)|
|Arrow transformer lifting an arrow to streams.
Arrows between streams.
Note: lift is only a functor if *** in the underlying arrow is.
Run a stream processor on a stream of inputs, obtaining a stream
Typical usage in arrow notation:
proc p -> do
ys <- (|runStream (\x -> ...)|) xs
Here xs refers to the input stream and x to individual
elements of that stream. ys is bound to the output stream.
|Mappings of streams
In-place state updates.
Note: this is an arrow type, and lift can be used to promote arrows
from Kleisli (ST s): the resulting arrow updates the state for
each stream element in turn, and as long as the final state in not
required all is well. However, lift does not preserve composition,
because this monad isn't commutative. In particular, a composition
of lifts of state transformers will not work, as the second will
require the final state of the first.
|Encapsulate a local state.
Adding a Control.Arrow.Transformer.Stream.StreamArrow to an
arrow type, but not necessarily as the outer arrow transformer.
Typically a composite arrow type is built by applying a series
of arrow transformer to a base arrow (usually either a function
arrow or a Kleisli arrow. One can add a transformer to the
top of this stack using the Control.Arrow.Transformer.lift
method of the Control.Arrow.Transformer.ArrowTransformer class,
or remove a state transformer from the top of the stack using the
Control.Arrow.Transformer.Stream.runStream encapsulation operator.
The methods of this class add and remove state transformers anywhere
in the stack. In the instance
instance Arrow a => ArrowAddStream (ArrowStream a) a
they are equivalent to Control.Arrow.Transformer.lift and
Instances are lifted through other transformers with
instance ArrowAddStream a a' =>
ArrowAddStream (FooArrow a) (FooArrow a')
|liftStream :: a' e b -> a e b||Source|
|Produced by Haddock version 2.3.0|