Binary serialization with version control.
|LTS Haskell 20.15:||0.10.4.2@rev:6|
|Stackage Nightly 2023-03-26:||0.10.4.2@rev:6|
|Latest on Hackage:||0.10.4.2@rev:6|
Module documentation for 0.10.4.2
An extension to Data.Serialize with built-in version control.
Add a Typeable a superclass to SafeCopy. The previous version in effect had the Typeable constraint anyway, this means less need to specify it. The SafeCopy’ type alias is now identical to SafeCopy. This should not break any code except perhaps some GADT types that use “deriving Typeable”. These may need a standalone deriving instance.
This version replaces the default implementation of getCopy and putCopy with a full implementation using GHC.Generics. Before these functions simply serialized and deserialized their argument. Now they function identically to the instances generated by deriveSafeCopy. This means that embedded values with SafeCopy instances will be migrated properly, and that you can replace template haskell with standalone deriving instances such as “deriving instance SafeCopy Foo where kind = extension; version = 3”.
The one caveat is that the new default implementation of getCopy and putCopy adds the constraint “Typeable a”, so that it can build a set of the subtypes that appear in a. This will only affect code that already used the default instance, not code that used deriveSafeCopy or custom SafeCopy instances. If you do run into this you can add a custom SafeCopy instance with the old implementations mentioned above.
- Support ghc-8.4.1
- Travis config for ghc-8.2.1
- SafeCopy instance for Data.List.NonEmpty.NonEmpty
- fixed tests to work with QuickCheck-2.8.2
- add SafeCopy instance for Word
- updates for template-haskell 2.11
- export some internal TH derivation helpers
This version changes the way
Double are serialized to a
more compact format. Old data should be migrated automatically. As a
result, however, the
Double data serialized by this version can not be read
by older versions of
This change originated as a modification to the way
cereal 0.5 serializes