Safe Haskell | Safe |
---|---|
Language | Haskell98 |
This module provides an API compatible with Control.Pipe
Consult Control.Pipe.Core for more extensive documentation and Control.Pipe.Tutorial for an extended tutorial.
- type Pipe a b = Proxy () a () b
- type Producer b = Pipe () b
- type Consumer a = Pipe a C
- type Pipeline = Pipe () C
- await :: Monad m => Pipe a b m a
- yield :: Monad m => b -> Pipe a b m ()
- pipe :: Monad m => (a -> b) -> Pipe a b m r
- (<+<) :: Monad m => Pipe b c m r -> Pipe a b m r -> Pipe a c m r
- (>+>) :: Monad m => Pipe a b m r -> Pipe b c m r -> Pipe a c m r
- idP :: Monad m => Pipe a a m r
- runPipe :: Monad m => Pipeline m r -> m r
Types
type Pipe a b = Proxy () a () b Source #
The type variables of Pipe a b m r
signify:
a
- The type of input received from upstream pipesb
- The type of output delivered to downstream pipesm
- The base monadr
- The type of the return value
Create Pipes
await :: Monad m => Pipe a b m a Source #
Wait for input from upstream
await
blocks until input is available
Compose Pipes
(<+<) :: Monad m => Pipe b c m r -> Pipe a b m r -> Pipe a c m r infixr 9 Source #
Corresponds to (<<<
)/(.
) from Control.Category
(>+>) :: Monad m => Pipe a b m r -> Pipe b c m r -> Pipe a c m r infixl 9 Source #
Corresponds to (>>>
) from Control.Category