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.Advanced

Home of the more specialized functions.

  • 1 type
  • 2 classes
  • 7 values
  • Packageacid-state-0.16.1.4
  • Exports10
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourceAdvanced.hs
valuescheduleUpdate
  1. :: UpdateEvent event
  2. => AcidState (EventState event)
  3. -> event
  4. -> IO (MVar (EventResult event))
#

Issue an Update event and return immediately. The event is not durable before the MVar has been filled but the order of events is honored. The behavior in case of exceptions is exactly the same as for update.

If EventA is scheduled before EventB, EventA will be executed before EventB:

do scheduleUpdate acid EventA
   scheduleUpdate acid EventB
   
valuegroupUpdates
  1. :: UpdateEvent event
  2. => AcidState (EventState event)
  3. -> [event]
  4. -> IO ()
#

Schedule multiple Update events and wait for them to be durable, but throw away their results. This is useful for importing existing datasets into an AcidState.

classclass Method ev where
#

The basic Method class. Each Method has an indexed result type and a unique tag.

Associated types

Methods

datadata Event st where
#

We distinguish between events that modify the state and those that do not.

UpdateEvents are executed in a MonadState context and have to be serialized to disk before they are considered durable.

QueryEvents are executed in a MonadReader context and obviously do not have to be serialized to disk.

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 |