Safe Haskell | None |
---|---|
Language | Haskell2010 |
Read and write values of types that implement Binary
from and to Handle
s
This module homes the unlifted API variant. For proper documentation check out the equally named functions in Data.Binary.IO.Lifted
Synopsis
- data ReaderError = ReaderGetError {}
- newtype Reader = Reader {}
- newReader :: Handle -> IO Reader
- newReaderWith :: IO ByteString -> IO Reader
- newtype Writer = Writer {}
- newWriter :: Handle -> Writer
- newWriterWith :: (ByteString -> IO ()) -> Writer
- newPipe :: IO (Reader, Writer)
- data Duplex = Duplex {
- duplexWriter :: !Writer
- duplexReader :: !Reader
- newDuplex :: Handle -> IO Duplex
- newDuplexWith :: IO ByteString -> (ByteString -> IO ()) -> IO Duplex
- type CanGet r = CanGet r IO
- runGet :: CanGet r => r -> Get a -> IO a
- read :: (CanGet r, Binary a) => r -> IO a
- isEmpty :: CanGet r => r -> IO Bool
- type CanPut w = CanPut w IO
- runPut :: CanPut w => w -> PutM a -> IO a
- write :: (CanPut w, Binary a) => w -> a -> IO ()
Reader
data ReaderError Source #
An error that can occur during reading
Since: 0.4.0
ReaderGetError | Error from the |
|
Instances
Show ReaderError Source # | |
Defined in Data.Binary.IO.Lifted showsPrec :: Int -> ReaderError -> ShowS # show :: ReaderError -> String # showList :: [ReaderError] -> ShowS # | |
Exception ReaderError Source # | |
Defined in Data.Binary.IO.Lifted |
Unlifted version of newReader
Since: 0.0.1
:: IO ByteString | Chunk producer |
-> IO Reader |
Unlifted version of newReaderWith
.
Since: 0.1.1
Writer
Since: 0.0.1
Unlifted version of newWriter
Since: 0.0.1
:: (ByteString -> IO ()) | Chunk handler |
-> Writer |
Unlifted version of newWriterWith
Since: 0.1.1
Pipe
Duplex
Since: 0.0.1
Duplex | |
|
Unlifted version of newDuplex
Since: 0.0.1
newDuplexWith :: IO ByteString -> (ByteString -> IO ()) -> IO Duplex Source #
Unlifted version of newDuplexWith
Since: 0.1.1
Classes
Unlifted version of runGet
Since: 0.0.1
Unlifted version of runPut
Since: 0.0.1