simple-pipe-0.0.0.28: simple pipeline library like conduit

Safe HaskellSafe-Inferred

Data.Pipe

Synopsis

Documentation

class PipeClass p whereSource

Methods

runPipe :: Monad m => p i o m r -> m (Maybe r)Source

(=$=) :: Monad m => p a b m x -> p b c m y -> p a c m ySource

yield :: Monad m => o -> p i o m ()Source

await :: Monad m => p i o m (Maybe i)Source

onBreak :: Monad m => p i o m r -> m b -> p i o m rSource

onDone :: Monad m => p i o m r -> m b -> p i o m rSource

finalize :: Monad m => p i o m r -> m b -> p i o m rSource

mapMonad :: Monad m => (forall a. m a -> m a) -> p i o m r -> p i o m rSource

mapOut :: Monad m => (o -> o') -> p i o m r -> p i o' m rSource

mapIn :: Monad m => (i' -> i) -> p i o m r -> p i' o m rSource

Instances

class PipeClass pc => PipeChoice pc whereSource

Minimal complete definition: appLeft

Methods

appLeft :: Monad m => pc b c m r -> pc (Either b d) (Either c d) m rSource

appRight :: Monad m => pc b c m r -> pc (Either d b) (Either d c) m rSource

(++++) :: Monad m => pc b c m r -> pc b' c' m r -> pc (Either b b') (Either c c') m rSource

(||||) :: Monad m => pc b d m r -> pc c d m r -> pc (Either b c) d m rSource

Instances

(=@=) :: (PipeClass p, PipeChoice p, Monad m, Monad (p i (Either a r) m), Monad (p a o m), Monad (p r o m), Monad (p (Either a r) o m)) => p i a m r -> p a o m r' -> p i o m rSource

runPipe_ :: (PipeClass p, Monad m) => p i o m r -> m ()Source

convert :: (PipeClass p, Monad m, Monad (p a b m)) => (a -> b) -> p a b m ()Source

data Pipe i o m r Source

Instances

PipeChoice Pipe 
PipeClass Pipe 
PipeLazy Pipe 
MonadTrans (Pipe i o) 
Monad m => Monad (Pipe i o m) 
Monad m => Functor (Pipe i o m) 
Monad m => Applicative (Pipe i o m) 
MonadIO m => MonadIO (Pipe i o m) 
MonadWriter m => MonadWriter (Pipe i o m) 
MonadState m => MonadState (Pipe i o m) 
MonadReader m => MonadReader (Pipe i o m) 
MonadError m => MonadError (Pipe i o m) 

finally :: (MonadBaseControl IO m, PipeClass p) => p i o m r -> m b -> p i o m rSource

bracket :: (MonadBaseControl IO m, PipeClass p, MonadTrans (p i o), Monad (p i o m)) => m a -> (a -> m b) -> (a -> p i o m r) -> p i o m rSource