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.Memory.Pure

AcidState container without a transaction log. Mostly used for testing.

This module consists of internal implementation details for Data.Acid.Memory. You should not normally need to import it. Call openMemoryState and thereafter use the API from Data.Acid instead.

  • 6 types
  • 3 classes
  • 7 values
  • Packageacid-state-0.16.1.4
  • Exports16
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourcePure.hs
datadata AcidState st
#

Pure state value used internally. This is not the same as Data.Acid.AcidState from Data.Acid.

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

newtypenewtype Update st a
#

Context monad for Update events.

Instances4MonadState, Monad, Functor, Applicative
newtypenewtype Query st a
#

Context monad for Query events.

Instances4MonadReader, Monad, Functor, Applicative
  • MonadReader st (Query st)Defined in acid-state-0.16.1.4 · Data.Acid.Common
  • Monad (Query st)Defined in acid-state-0.16.1.4 · Data.Acid.Common
  • Functor (Query st)Defined in acid-state-0.16.1.4 · Data.Acid.Common
  • Applicative (Query st)Defined in acid-state-0.16.1.4 · Data.Acid.Common
valueupdate
  1. :: UpdateEvent event
  2. => AcidState (EventState event)
  3. -> event
  4. -> (AcidState (EventState event), EventResult event)
#

Issue an Update event and wait for its result. Once this call returns, you are guaranteed that the changes to the state are durable. Events may be issued in parallel.

It's a run-time error to issue events that aren't supported by the AcidState.