Copyright | © 2015 Patryk Zadarnowski <pat@jantar.org> |
---|---|

License | BSD3 |

Maintainer | pat@jantar.org |

Stability | experimental |

Portability | portable |

Safe Haskell | Safe |

Language | Haskell2010 |

Conversion between finite and infinite pipe using the `Either`

type.

- catWhileLeft :: Monad m => Pipe (Either a r) a m r
- catWhileRight :: Monad m => Pipe (Either r a) a m r
- extendWithLeft :: Monad m => Pipe a b m r -> Pipe a (Either r b) m r'
- extendWithRight :: Monad m => Pipe a b m r -> Pipe a (Either b r) m r'

# 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`

.