HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

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.

  • 2 types
  • 4 values
  • Packagestore-0.7.20
  • Exports6
  • LanguageHaskell2010
  • LicenceMIT
  • SourceVersion.hs
newtypenewtype StoreVersion
#
Instances7Eq, Data, Ord, Show, Generic, Store, …
datadata VersionConfig a
#

Configuration for the version checking of a particular type.

Constructors

Instances5Eq, Data, Show, Generic, Rep