pipes-extra-0.0.1: Pipes utilities

Control.Pipe.Conduit

Description

Adapters to convert conduits to pipes.

Synopsis

Documentation

sourcePipe :: Resource m => Source m a -> Pipe x a (ResourceT m) ()

Convert a Source into a Pipe.

The resulting Pipe is a Producer which pulls from the Source until exhaustion and yields the received data.

conduitPipe :: Resource m => Conduit a m b -> Pipe a b (ResourceT m) (Maybe a)

Convert a Conduit to Pipe.

The resulting pipe behaves like the original Conduit, and closes it upon termination. Any unconsumed input is returned.

conduitPipe_ :: Resource m => Conduit a m b -> Pipe a b (ResourceT m) ()

Convert a Conduit to a Pipe, ignoring unconsumed input.

sinkPipe :: Resource m => Sink a m b -> Pipe a x (ResourceT m) (Maybe a, b)

Convert a Sink into a Pipe.

Optional consumed input is returned, together with the sink result.

sinkPipe_ :: Resource m => Sink a m b -> Pipe a x (ResourceT m) ()

Convert a Sink into a Pipe, ignoring results.