| Copyright | (C) 2015 Oleg Grenrus |
|---|---|
| License | BSD3 |
| Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Binary.Orphans
Description
Class re-export
class Binary t where
The Binary class provides put and get, methods to encode and
decode a Haskell value to a lazy ByteString. It mirrors the Read and
Show classes for textual representation of Haskell types, and is
suitable for serialising Haskell values to disk, over the network.
For decoding and generating simple external binary formats (e.g. C
structures), Binary may be used, but in general is not suitable
for complex protocols. Instead use the Put and Get primitives
directly.
Instances of Binary should satisfy the following property:
decode . encode == id
That is, the get and put methods should be the inverse of each
other. A range of instances are provided for basic Haskell types.
Minimal complete definition
Nothing
Instances
Module re-export
module Data.Binary
Orphan instances
| Binary UTCTime Source | |
| Binary Value Source | |
| Binary All Source | Since: binary-orphans-0.1.1.0 |
| Binary Any Source | Since: binary-orphans-0.1.1.0 |
| Binary LocalTime Source | |
| Binary TimeOfDay Source | |
| Binary TimeZone Source | |
| Binary NominalDiffTime Source | |
| Binary Day Source | |
| Binary UniversalTime Source | |
| Binary DiffTime Source | |
| Binary (Fixed a) Source | |
| Binary a => Binary (Dual a) Source | Since: 0.1.1.0 |
| Binary a => Binary (Sum a) Source | Since: binary-orphans-0.1.1.0 |
| Binary a => Binary (Product a) Source | Since: binary-orphans-0.1.1.0 |
| Binary a => Binary (First a) Source | Since: binary-orphans-0.1.1.0 |
| Binary a => Binary (Last a) Source | Since: binary-orphans-0.1.1.0 |
| Binary a => Binary (Min a) Source | Since: binary-orphans-0.1.3.0 |
| Binary a => Binary (Max a) Source | Since: binary-orphans-0.1.3.0 |
| Binary a => Binary (First a) Source | Since: binary-orphans-0.1.3.0 |
| Binary a => Binary (Last a) Source | Since: binary-orphans-0.1.3.0 |
| Binary a => Binary (Option a) Source | Since: binary-orphans-0.1.3.0 |
| Binary a => Binary (NonEmpty a) Source | Since: binary-orphans-0.1.3.0 |
| (Hashable v, Eq v, Binary v) => Binary (HashSet v) Source | |
| (Hashable k, Eq k, Binary k, Binary v) => Binary (HashMap k v) Source | |
| Binary b => Binary (Tagged k s b) Source | |