acme-timemachine-0.0.1.0: An easy way to perform and unperform IO and other stateful actions.

Safe HaskellNone
LanguageHaskell2010

Acme.TimeMachine.STM

Synopsis

Documentation

data Entanglement Source

State of the STM.

type AtomicTimeMachine = Undoable Entanglement Source

Undo-able atomic software transaction monad. Lets you perform and unperform side-effectful atomic transactions.

doSTM :: STM a -> AtomicTimeMachine a Source

Run an STM action.

atomicallyTM :: AtomicTimeMachine a -> TimeMachine a Source

Embed an undo-able transaction in an undo-able computation.

runATM :: AtomicTimeMachine a -> STM a Source

Execute an undo-able transaction.

runATMIO :: AtomicTimeMachine a -> IO a Source

Execute an undo-able transaction within the IO monad.