|Portability||Rank 2 Types, GADTs|
|Maintainer||Edward Kmett <firstname.lastname@example.org>|
- type Process a b = Machine (Is a) b
- type ProcessT m a b = MachineT m (Is a) b
- class Automaton k where
- process :: Monad m => (forall a. k a -> i -> a) -> MachineT m k o -> ProcessT m i o
- (<~) :: Monad m => ProcessT m b c -> MachineT m k b -> MachineT m k c
- (~>) :: Monad m => MachineT m k b -> ProcessT m b c -> MachineT m k c
- echo :: Process a a
- supply :: Monad m => [a] -> ProcessT m a b -> ProcessT m a b
- prepended :: Foldable f => f a -> Process a a
- filtered :: (a -> Bool) -> Process a a
- dropping :: Int -> Process a a
- taking :: Int -> Process a a
- droppingWhile :: (a -> Bool) -> Process a a
- takingWhile :: (a -> Bool) -> Process a a
- buffered :: Int -> Process a [a]
- fold :: Category k => (a -> b -> a) -> a -> Machine (k b) a
- scan :: Category k => (a -> b -> a) -> a -> Machine (k b) a
- asParts :: Foldable f => Process (f a) a
- sinkPart_ :: Monad m => (a -> (b, c)) -> ProcessT m c Void -> ProcessT m a b
- autoM :: Monad m => (a -> m b) -> ProcessT m a b
is a stream transducer that can consume values of type
Process a b
from its input, and produce values of type
b for its output.
Process that only passes through inputs that match a predicate.
Process that passes through the first
n elements from its input then stops
Process that drops elements while a predicate holds
Process that passes through elements until a predicate ceases to hold, then stops
Chunk up the input into
n element lists.
Avoids returning empty lists and deals with the truncation of the last group.
Break each input into pieces that are fed downstream individually.
sinkPart_ toParts sink creates a process that uses the
toParts function to break input into a tuple of
sinkPart) for which the second projection is given to the supplied
ProcessT (that produces no output) while the first
projection is passed down the pipeline.