HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Moduleacid-state-0.16.1.4Haskell2010

Data.Acid.Archive

  • 3 types
  • 6 values
  • Packageacid-state-0.16.1.4
  • Exports9
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourceArchive.hs
typetype Entry = ByteString
#

A bytestring that represents an entry in an archive.

datadata Archiver
#

Interface for the lowest level of the serialisation layer, which handles packing lists of Entry elements (essentially just bytestrings) into a single bytestring, perhaps with error-checking.

Any Archiver{archiveWrite, archiveRead} must satisfy the round-trip property:

forall xs . entriesToList (archiveRead (archiveWrite xs)) == xs

Moreover, archiveWrite must be a monoid homomorphism, so that concatenating archives is equivalent to concatenating the lists of entries that they represent:

archiveWrite [] == empty
forall xs ys . archiveWrite xs <> archiveWrite ys == archiveWrite (xs ++ ys)

Constructors

Standard (and historically the only) implementation of the Archiver interface. This represents each entry in the following format:

| entry length | crc16   | entry   |
| 8 bytes      | 2 bytes | n bytes |