| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Binary.IO
Readers
data ReaderError Source #
An error that can occur during reading
Since: 0.0.1
Constructors
| ReaderGetError | Error from the |
Fields
| |
Instances
| Show ReaderError Source # | |
Defined in Data.Binary.IO Methods showsPrec :: Int -> ReaderError -> ShowS # show :: ReaderError -> String # showList :: [ReaderError] -> ShowS # | |
| Exception ReaderError Source # | |
Defined in Data.Binary.IO Methods toException :: ReaderError -> SomeException # fromException :: SomeException -> Maybe ReaderError # displayException :: ReaderError -> String # | |
Since: 0.0.1
Create a new reader.
Reading using the Reader may throw ReaderError.
The internal position of the Reader is not advanced when it throws an exception during reading.
This has the consequence that if you're trying to read with the same faulty Get
operation multiple times, you will always receive an exception.
Other threads reading from the Handle will interfere with read operations of the Reader.
However, the Reader itself is thread-safe and can be utilized concurrently.
Once the Handle reaches EOF, it will be closed.
The given Handle will be swiched to binary mode via hSetBinaryMode.
Since: 0.0.1
Writers
Since: 0.0.1
Duplex
Classes
r can execute Get operations
Since: 0.0.1
Read something from r.
Since: 0.0.1