Safe Haskell | Safe-Infered |
---|
- fileReader :: MonadIO m => FilePath -> Pipe () ByteString m ()
- handleReader :: MonadIO m => Handle -> Pipe () ByteString m ()
- fileWriter :: MonadIO m => FilePath -> Pipe ByteString Void m r
- handleWriter :: MonadIO m => Handle -> Pipe ByteString Void m r
- take :: Monad m => Int -> Pipe ByteString ByteString m ByteString
- takeWhile :: Monad m => (Word8 -> Bool) -> Pipe ByteString ByteString m ByteString
- dropWhile :: Monad m => (Word8 -> Bool) -> Pipe ByteString ByteString m r
- lines :: Monad m => Pipe ByteString ByteString m r
- bytes :: Monad m => Pipe ByteString Word8 m r
Handle and File IO
fileReader :: MonadIO m => FilePath -> Pipe () ByteString m ()Source
Read data from a file.
handleReader :: MonadIO m => Handle -> Pipe () ByteString m ()Source
Read data from an open handle.
fileWriter :: MonadIO m => FilePath -> Pipe ByteString Void m rSource
Write data to a file.
The file is only opened if some data arrives into the pipe.
handleWriter :: MonadIO m => Handle -> Pipe ByteString Void m rSource
Write data to a handle.
Chunked Byte Stream Manipulation
take :: Monad m => Int -> Pipe ByteString ByteString m ByteStringSource
Act as an identity for the first n
bytes, then terminate returning the
unconsumed portion of the last chunk.
takeWhile :: Monad m => (Word8 -> Bool) -> Pipe ByteString ByteString m ByteStringSource
Act as an identity as long as the given predicate holds, then terminate returning the unconsumed portion of the last chunk.
dropWhile :: Monad m => (Word8 -> Bool) -> Pipe ByteString ByteString m rSource
Drop bytes as long as the given predicate holds, then act as an identity.
lines :: Monad m => Pipe ByteString ByteString m rSource
Split the chunked input stream into lines, and yield them individually.