pipes-cellular-0.0.0.1: Pipes-based combinators for cellular data processing

Copyright© 2015 Patryk Zadarnowski <pat@jantar.org>
LicenseBSD3
Maintainerpat@jantar.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Pipes.Either

Description

Conversion between finite and infinite pipe using the Either type.

Synopsis

Documentation

catWhileLeft :: Monad m => Pipe (Either a r) a m r Source

A pipe that receives and forwards all Left values in its input up to the first occurence of a 'Right r' value, returning the value r.

catWhileRight :: Monad m => Pipe (Either r a) a m r Source

A pipe that receives and forwards all Right values in its input up to the first occurence of a 'Left r' value, returning the value r.

extendWithLeft :: Monad m => Pipe a b m r -> Pipe a (Either r b) m r' Source

Converts a finite pipe into an infinite pipe, in which the original pipe's values are followed by an infinite stream of 'Left r'.

extendWithRight :: Monad m => Pipe a b m r -> Pipe a (Either b r) m r' Source

Converts a finite pipe into an infinite pipe, in which the original pipe's values are followed by an infinite stream of 'Right r'.