|Portability||non-portable (uses GHC extensions)|
Home of the more specialized functions.
- scheduleUpdate :: UpdateEvent event => AcidState (EventState event) -> event -> IO (MVar (EventResult event))
- update' :: (UpdateEvent event, MonadIO m) => AcidState (EventState event) -> event -> m (EventResult event)
- query' :: (QueryEvent event, MonadIO m) => AcidState (EventState event) -> event -> m (EventResult event)
- class (Typeable ev, SafeCopy ev, Typeable (MethodResult ev), SafeCopy (MethodResult ev)) => Method ev where
- class SafeCopy st => IsAcidic st where
- data Event st where
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
If EventA is scheduled before EventB, EventA will be executed before EventB:
do scheduleUpdate acid EventA scheduleUpdate acid EventB
update but lifted into any monad capable of doing IO.
query but lifted into any monad capable of doing IO.
The basic Method class. Each Method has an indexed result type and a unique tag.
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.