Methods
acidEvents :: [Event st]
:: a typeCtrl KGHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19
Moduleacid-state-0.16.1.4Haskell2010
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.
acidEvents :: [Event st]Pure state value used internally. This is not the same as
Data.Acid.AcidState from Data.Acid.
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.
UpdateEvent :: UpdateEvent ev => (ev -> Update (EventState ev) (EventResult ev)) -> MethodSerialiser ev -> Event (MethodState ev)QueryEvent :: QueryEvent ev => (ev -> Query (EventState ev) (EventResult ev)) -> MethodSerialiser ev -> Event (MethodState ev)Events return the same thing as Methods. The exact type of EventResult depends on the event.
All UpdateEvents are also Methods.
All QueryEvents are also Methods.
Context monad for Update events.
MonadState st (Update st)Defined in acid-state-0.16.1.4 · Data.Acid.CommonMonad (Update st)Defined in acid-state-0.16.1.4 · Data.Acid.CommonFunctor (Update st)Defined in acid-state-0.16.1.4 · Data.Acid.CommonApplicative (Update st)Defined in acid-state-0.16.1.4 · Data.Acid.CommonContext monad for Query events.
MonadReader st (Query st)Defined in acid-state-0.16.1.4 · Data.Acid.CommonMonad (Query st)Defined in acid-state-0.16.1.4 · Data.Acid.CommonFunctor (Query st)Defined in acid-state-0.16.1.4 · Data.Acid.CommonApplicative (Query st)Defined in acid-state-0.16.1.4 · Data.Acid.CommonCreate an AcidState given an initial value.
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.
Same as update but ignoring the event result.
Issue a Query event and wait for its result.
Run a query in the Update Monad.
Execute the Update monad in a pure environment.
Execute the Query monad in a pure environment.