binary-tagged: Tagged binary serialisation.

[ bsd3, data, library ] [ Propose Tags ]

Check README on Github

[Skip to Readme]
Versions [RSS] [faq],,,,,,,, 0.1.5,,, 0.2, 0.3, 0.3.1
Dependencies aeson (>=0.8 && <0.11), array (==0.5.*), base (>=4.7 && <4.9), binary (==0.7.*), bytestring (==0.10.*), containers (==0.5.*), generics-sop (==0.1.*), hashable (==1.2.*), scientific (==0.3.*), SHA (==1.6.*), tagged (>=0.7 && <0.9), text (==1.2.*), time (>=1.4 && <1.6), unordered-containers (==0.2.*), vector (>=0.10 && <0.12) [details]
License BSD-3-Clause
Author Oleg Grenrus <>
Maintainer Oleg Grenrus <>
Revised Revision 1 made by phadej at 2015-09-19T10:16:04Z
Category Web
Home page
Bug tracker
Source repo head: git clone
Uploaded by phadej at 2015-09-08T14:22:33Z
Distributions Arch:0.3.1, Debian:0.1.5, LTSHaskell:0.3.1, NixOS:0.3, Stackage:0.3.1
Downloads 13249 total (68 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2015-09-08 [all 1 reports]




Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for binary-tagged-

[back to package description]


Build Status Hackage

Structurally tag binary serialisation stream.

Say you have:

data Record = Record
  { _recordFields :: HM.HashMap Text (Integer, ByteString)
  , _recordEnabled :: Bool
  deriving (Eq, Show, Generic)

instance Binary Record
instance HasStructuralInfo Record
instance HasSemanticVersion Record

then you can serialise and deserialise Record values with a structure tag by simply

encodeTaggedFile "cachefile" record
decodeTaggedFile "cachefile" :: IO Record

If structure of Record changes in between, deserialisation will fail early.

The overhead is next to non-observable, see a simple benchmark and the results.