tagged-binary

Provides tools for serializing data tagged with type information.

Version on this page:0.2.0.0
LTS Haskell 8.15:0.2.0.0
Stackage Nightly 2017-05-27:0.2.0.0
Latest on Hackage:0.2.0.0
MIT licensed and maintained by Justin Le

Module documentation for 0.2.0.0

tagged-binary

Very minimal (Haskell) library providing tools for serializing and decoding data into ByteString tagged with information about its type, inspired by Cloud Haskell and distributed-process.

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 necessary. Data.Binary.Tagged.Internal is exported in case you need it.

Quick example

> let x = encodeTagged (1 :: Int)
> decodeTagged x :: Maybe Bool
Nothing
> decodeTagged x :: Maybe Int
Just 1

Copyright (c) 2014 Justin Le

Changes

0.2.0.0

https://github.com/mstksg/tagged-binary/releases/tag/v0.2.0.0

  • Removed Default instance on TagFingerprint in favor of just a normal emptyTagFP function. 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.

0.1.2.0

https://github.com/mstksg/tagged-binary/releases/tag/v0.1.2.0

  • Tagged ByteStrings now lead with a "TagLead" byte sequence that signifies that a Tagged is 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 Default instance is the MD5Digest of an empty string.

0.1.0.0

https://github.com/mstksg/tagged-binary/releases/tag/v0.1.0.0

  • Initial version.

Used by 1 package:
comments powered byDisqus