Safe Haskell | None |
---|---|
Language | Haskell2010 |
- fromLazy :: ByteString -> Source ByteString
- fromStrict :: ByteString -> Source ByteString
- fromHandle :: MonadIO m => Handle -> SourceT m ByteString
- hGet :: MonadIO m => Int -> Handle -> SourceT m ByteString
- hGetSome :: MonadIO m => Int -> Handle -> SourceT m ByteString
- hGetNonBlocking :: MonadIO m => Int -> Handle -> SourceT m ByteString
- stdin :: MonadIO m => SourceT m ByteString
- stdout :: MonadIO m => MachineT m (Is ByteString) ()
- stderr :: MonadIO m => MachineT m (Is ByteString) ()
- toHandle :: MonadIO m => Handle -> MachineT m (Is ByteString) ()
- interact :: Process ByteString ByteString -> IO ()
- mapping :: (Word8 -> Word8) -> Process ByteString ByteString
- filtered :: (Word8 -> Bool) -> Process ByteString ByteString
- taking :: Integral n => n -> Process ByteString ByteString
- takingWhile :: (Word8 -> Bool) -> Process ByteString ByteString
- scan :: (Word8 -> Word8 -> Word8) -> Word8 -> Process ByteString ByteString
- pack :: Process Word8 ByteString
- unpack :: Process ByteString Word8
Sources
fromLazy :: ByteString -> Source ByteString Source #
Transform a lazy ByteString into a Source
of strict ByteString
.
fromStrict :: ByteString -> Source ByteString Source #
Use a strict ByteString as Source
fromHandle :: MonadIO m => Handle -> SourceT m ByteString Source #
Use an Handle
to create a Source
of strict ByteString
.
hGet :: MonadIO m => Int -> Handle -> SourceT m ByteString Source #
Read chunks of strict ByteString
of fixed size.
hGetSome :: MonadIO m => Int -> Handle -> SourceT m ByteString Source #
Like hGet
but may be returned smaller chunks if there are not enough
data immediately available.
hGetNonBlocking :: MonadIO m => Int -> Handle -> SourceT m ByteString Source #
Similar to hGet
but it will never block waiting for data.
Sinks
toHandle :: MonadIO m => Handle -> MachineT m (Is ByteString) () Source #
Create a Machine
that stream its input to the given Handle
interact :: Process ByteString ByteString -> IO () Source #
Processes
mapping :: (Word8 -> Word8) -> Process ByteString ByteString Source #
Transform every byte of a ByteString
filtered :: (Word8 -> Bool) -> Process ByteString ByteString Source #
Allow to pass only the bytes that satisfy the predicate
taking :: Integral n => n -> Process ByteString ByteString Source #
Stream only the first n bytes
takingWhile :: (Word8 -> Bool) -> Process ByteString ByteString Source #
Stream bytes until they fail the predicate
scan :: (Word8 -> Word8 -> Word8) -> Word8 -> Process ByteString ByteString Source #
Strict left scan over the bytes
pack :: Process Word8 ByteString Source #
Convert a stream of Bytes into a stream of strict ByteString
of
size equal to defaultChunkSize
unpack :: Process ByteString Word8 Source #
Convert a stream of strict ByteString
into a stream of Bytes