| Copyright | (c) Duncan Coutts 2015-2017 |
|---|---|
| License | BSD3-style (see LICENSE.txt) |
| Maintainer | duncan@community.haskell.org |
| Stability | experimental |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Codec.Serialise.IO
Description
High-level file-based API for serialising and deserialising values.
Synopsis
- writeFileSerialise :: Serialise a => FilePath -> a -> IO ()
- readFileDeserialise :: Serialise a => FilePath -> IO a
- hPutSerialise :: Serialise a => Handle -> a -> IO ()
FilePath API
FilePathArguments
| :: Serialise a | |
| => FilePath | The file to write to. |
| -> a | The value to be serialised and written. |
| -> IO () |
Serialise a and write it directly to the
specified file.ByteString
Since: 0.2.0.0
Read the specified file (internally, by reading a )
and attempt to decode it into a Haskell value using ByteString
(the type of which is determined by the choice of the result type).deserialise
Throws: if the file fails to
deserialise properly.DeserialiseFailure
Since: 0.2.0.0
Handle API
Handle