Safe Haskell  SafeInfered 

This module contains utilities to create and combine pipes that accept chunked input and return unconsumed portions of their internal buffer.
The main interface is an alternative monad instance for Pipe, which passes leftover data along automatically.
 newtype ChunkPipe a b m r = ChunkPipe {
 unChunkPipe :: Pipe a b m (a, r)
 nonchunked :: (Monoid a, Monad m) => Pipe a b m r > ChunkPipe a b m r
Documentation
newtype ChunkPipe a b m r Source
Newtype wrapper for Pipe proving a monad instance that takes care of passing leftover data automatically.
An individual ChunkPipe
is just a regular pipe, but returns unconsumed
input in a pair alongside the actual return value.
ChunkPipe  
