Modulestore-0.7.20Haskell2010
Data.Store.Version
This module provides utilities which help ensure that we aren't
attempting to de-serialize data that is an older or newer version.
The WithVersion utility wraps up a datatype along with a version
tag. This version tag can either be provided by the user
(namedVersionConfig), or use a computed hash
(hashedVersionConfig).
The magic here is using an SYB traversal (Data) to get the
structure of all the data-types involved. This info is rendered to
text and hashed to yield a hash which describes it.
NOTE that this API is still quite new and so is likely to break
compatibility in the future. It should also be expected that the
computed hashes may change between major version bumps, though this
will be minimized when directly feasible.