Safe Haskell | Safe-Inferred |
---|
- data InputStream = InputStream {
- _read :: IO ByteString
- _unread :: ByteString -> IO ()
- makeInputStream :: IO ByteString -> IO InputStream
- inputStreamFromHandle :: Handle -> IO InputStream
- readInput :: InputStream -> IO ByteString
- unreadInput :: InputStream -> ByteString -> IO ()
- readAtLeast :: InputStream -> Int -> IO ByteString
Documentation
data InputStream Source
An abstraction for input streams that allows to read and unread input.
InputStream | |
|
makeInputStream :: IO ByteString -> IO InputStreamSource
Create an InputStream
from provided IO
action.
inputStreamFromHandle :: Handle -> IO InputStreamSource
Create an InputStream
from provided Handle
.
readInput :: InputStream -> IO ByteStringSource
Read some input.
unreadInput :: InputStream -> ByteString -> IO ()Source
Push back some input. The pushed back input will be returned by a later
call to readInput
.
readAtLeast :: InputStream -> Int -> IO ByteStringSource
Read at least the specified number of bytes from the input stream.