BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:bytes-0.17.3@sha256:a249387f089dad1c4b3aafb4ac52386ed1f792b96f5fd6e7a27b6f3ec47445ca,2566

Module documentation for 0.17.3


Hackage Build Status

This package provides a simple compatibility shim that lets you work with both binary and cereal with one chunk of serialization code.

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on

-Edward Kmett


0.17.3 [2023.08.06]

  • Remove mtl dependency in favor transformers, as bytes was only using mtl for its transformers re-exports.

0.17.2 [2022.05.07]

  • Allow building with mtl-2.3.* and transformers-0.6.*.

0.17.1 [2021.02.17]

  • The build-type has been changed from Custom to Simple. To achieve this, the doctests test suite has been removed in favor of using cabal-docspec to run the doctests.
  • Provide the Serial Natural instance unconditionally.
  • Allow building with bytestring-0.11.*.

0.17 [2020.02.03]

  • Give MonadGet m a superclass of forall a b. Coercible a b => Coercible (m a) (m b) when built against GHC 8.6 or later. This allows Serial instances to be derived using GeneralizedNewtypeDeriving or DerivingVia when using in tandem with StandaloneDeriving.

0.16 [2019.08.27]

  • Support GHC-8.8.
  • MonadGet now requires MonadFail as a superclass.

0.15.5 [2018.07.03]

  • Add Serial(1) instances for NonEmpty.

0.15.4 [2018.04.05]

  • Use a significantly simpler Setup.hs script.


  • Support GHC 8.2
  • Revamp Setup.hs to use cabal-doctest. This makes it build with Cabal-2.0, and makes the doctests work with cabal new-build and sandboxes.


  • Support ghc 8
  • Support time 1.6
  • Support binary 0.8
  • Support transformers 0.5


  • Drop Trustworthy claim in Data.Bytes.Put as we now can sometimes infer Safe.
  • Bump cereal bound for
  • Add instance Serial Natural

  • Updated github URLs in the .cabal file.
  • We now compile without warnings on GHC 7.10.


  • Fixed a serious bug in the semantics of generic Serial1 generation for the recursive case and improved Generic1 support for :.:.

  • Support void 0.7 / GHC 7.10


  • Lots of new instances
  • text bound bump to allow 1.1.

  • Bumped dependency on text to support 1.0



  • Fixed issue #7, permitting the doctests to function against bytestring 0.9


  • Fixed issue #6 with regards to the test harness performance.


  • Fixed the doctests from 0.11.2


  • Constraint binary version for issue #5.


  • Liberalized containers dependency to allow containers versions all the way back to 0.3 for stackage purposes


  • Added Data.Bytes.VarInt and Data.Bytes.Signed.


  • Switched to <stdint.h> to get more portable size correctness.


  • Fixed typo in cbits/i2d.c that was causing a linking error.


  • Changed all of the byte orders to big-endian by default except for Word and Int, which are variable sized.


  • Added proper support for binary 0.7.
  • Restored lookAheadM and lookAheadE, thanks to the return of lookAheadE in binary 0.7.
  • Renamed Unchecked to Remaining, and removed the uncheckedLookAhead function, as it is no longer supported downstream.


  • Trustworthiness


  • Added a missing () instance


  • Added Serial2 and various missing Serial1 instances.


  • Added Serial and Serial1.


  • Repository initialized