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
Common structures used by the various backends (local, memory).
acidEvents :: [Event st]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.CommonMonadReader 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.CommonRun a query in the Update Monad.
Events return the same thing as Methods. The exact type of EventResult depends on the event.
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)All UpdateEvents are also Methods.
All QueryEvents are also Methods.