Provides tools for serializing data tagged with type information.
|LTS Haskell 20.15:||0.2.0.1|
|Stackage Nightly 2023-03-20:||0.2.0.1|
|Latest on Hackage:||0.2.0.1|
Module documentation for 0.2.0.1
Very minimal (Haskell) library providing tools for serializing and decoding data into
ByteString tagged with information about its type, inspired by Cloud Haskell
Intended for use by libraries and frameworks in distributed contexts, such as distributed computation between native servers and communication between native servers and ghcjs/various front-ends, for behavior similar to the polymorphic communication channels of Cloud Haskell and distributed-process; servers can send tagged data, and clients can choose to selectively accept, ignore or queue incoming messages depending on their types.
For basic encoding and decoding, only
Data.Binary.Tagged should be
Data.Binary.Tagged.Internal is exported in case you need it.
> let x = encodeTagged (1 :: Int) > decodeTagged x :: Maybe Bool Nothing > decodeTagged x :: Maybe Int Just 1
Copyright (c) 2015 Justin Le
- Compatibility with base-4.10 and ghc 8.2.
TagFingerprintin favor of just a normal
emptyTagFPfunction. This is a breaking change, and is the reason for the “major” version bump.
- Fixed bug on decoding badly formatted binary due to unexpected laziness.
- Removed dependency on data-default and spoon packages.
- Removed upper version bounds for all dependencies except for base.
ByteStringsnow lead with a “TagLead” byte sequence that signifies that a
Taggedis coming. For now, it is statically 0xfe 0xff, which are two bytes that are never found in any valid UTF-8 encoded string.
- So that all
TagFingerprints should be of the same length,
TagFingerprints contain an
MD5Digest, generated from the name of the type. Its
Defaultinstance is the
MD5Digestof an empty string.
- Initial version.