Safe Haskell | Safe-Infered |
---|
- firstP :: Monad m => Pipe a b m r -> Pipe (Either a c) (Either b c) m r
- secondP :: Monad m => Pipe a b m r -> Pipe (Either c a) (Either c b) m r
- (***) :: Monad m => Pipe a b m r -> Pipe a' b' m r -> Pipe (Either a a') (Either b b') m r
- associateP :: Monad m => Pipe (Either (Either a b) c) (Either a (Either b c)) m r
- disassociateP :: Monad m => Pipe (Either a (Either b c)) (Either (Either a b) c) m r
- discardL :: Monad m => Pipe (Either x a) a m r
- discardR :: Monad m => Pipe (Either a x) a m r
- swapP :: Monad m => Pipe (Either a b) (Either b a) m r
- joinP :: Monad m => Pipe (Either a a) a m r
- splitP :: Monad m => Pipe a (Either a a) m r
- loopP :: Monad m => Pipe (Either a c) (Either b c) m r -> Pipe a b m r
Documentation
The combinators in this module allow you to create and manipulate
multi-channel pipes. Multiple input or output channels are represented with
Either
types.
Most of the combinators are generalizations of the corresponding functions
in Arrow
, and obey appropriately generalized laws.
secondP :: Monad m => Pipe a b m r -> Pipe (Either c a) (Either c b) m rSource
This function is the equivalent of firstP
for the right component.
(***) :: Monad m => Pipe a b m r -> Pipe a' b' m r -> Pipe (Either a a') (Either b b') m rSource
Combine two pipes into a single pipe that behaves like the first on the left component, and the second on the right component.
associateP :: Monad m => Pipe (Either (Either a b) c) (Either a (Either b c)) m rSource
Convert between the two possible associations of a triple sum.
disassociateP :: Monad m => Pipe (Either a (Either b c)) (Either (Either a b) c) m rSource
Inverse of associateP
.
joinP :: Monad m => Pipe (Either a a) a m rSource
Yield both components of input values into the output.