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 |
High-level file-based API for serialising and deserialising values.
- writeFileSerialise :: Serialise a => FilePath -> a -> IO ()
- readFileDeserialise :: Serialise a => FilePath -> IO a
- hPutSerialise :: Serialise a => Handle -> a -> IO ()
FilePath
API
FilePath
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
Serialise a
(via ByteString
) and write it directly
to the specified serialise
.Handle
Since: 0.2.0.0