The binary-typed package
Binary serialization tagged with type information, allowing for typechecking and useful error messages at the receiving site.
This package serves the same purpose as tagged-binary, with a couple of key differences:
Support of different kinds of serialized type annotations, each with specific strengths and weaknesses.
Error messages can provide details on type errors at the cost of longer message lengths to include the necessary information.
Very small performance overhead compared to using standard Binary due to caching when using hashed type information. Since shown and full types are not cached, decoding them has a significant performance hit (ballpark: factor of two).
No depencency on Internal modules of other libraries, and a very small dependency footprint in general.
For information about usage, see the Data.Binary.Typed.Tutorial module.
Performance-wise, here is a value Right (Left <100 chars lipsum>) of type Either (Char, Int) (Either String (Maybe Integer)) benchmarked using the Hashed64 type representation:
|Versions||0.1.0.0, 0.1.0.1, 0.2.0.0, 0.2.0.1, 0.2.1.0, 0.2.2, 0.2.3, 0.3, 1.0 (info)|
|Dependencies||base (>=4.7 && <5), binary (>=0.7), bytestring (>=0.9), murmur-hash (>=0.1) [details]|
|Copyright||David Luposchainsky <dluposchainsky on googles email service>|
|Author||David Luposchainsky <dluposchainsky on googles email service>|
|Maintainer||David Luposchainsky <dluposchainsky on googles email service>|
|Source repository||head: git clone https://github.com/quchen/binary-typed|
|Uploaded||Sat Dec 19 20:58:32 UTC 2015 by quchen|
|Distributions||LTSHaskell:1.0, NixOS:1.0, Stackage:1.0|
|Downloads||1363 total (32 in last 30 days)|
|Status||Docs available [build log]|
Last success reported on 2015-12-19 [all 1 reports]
- binary-typed-1.0.tar.gz [browse] (Cabal source package)
- Package description (included in the package)
For package maintainers and hackage trustees