úÎ Á     None An "undoable action" is a wrapper for an  action (the "doer" ) that combines it with another  action (the "undoer",) that undoes the effects of the first one. ^Undoable actions are monads, and when sequenced together they act like transactions involving  operations. fAs undoable actions are sequenced together, their doers are also sequenced together and their undoers gare placed into a stack. When the doers are executed, if one of them throws an exception, the undoers rso far added to the stack are executed in reverse the reverse of the order in which they were added to the stack, rand then the exception is rethrown; no other doers (or undoers) are executed. If no exception is thrown, none of the undoers are executed. An ExceptionalMonad is a monad that in which s can be thrown and caught. A monad m must implement ExceptionalMonad in order to work with . Throw an exception. Catch an exception. DA monad for combining other, side-effectual monads in a transaction 4that can be rolled back if an exception is thrown. m must implement ExceptionalMonad. KThis type is for implementing transactions and should not be used directly  by code that uses transactions.  Convert an  action into an  action that invokes Bthe actions (and the undoers if necessary) that were added to the  action. Make an undoable action. ,Make an undoable action without any undoer. BThis undoable action will not add any undoer to the undoer stack. #Add an undoer to the undoer stack. ?Stop execution, run the actions on the undoer stack, and throw .   The "doer": the action to perform. An "undoer"5: an action that undoes the effect of the other one. The "doer": the action to perform. An "undoer"4: an action that will be added to the undoer stack.            iotransaction-0.1Control.IoTransactionControl Exception UndoableIO ManualUndoExceptionalMonadthrowMcatchM UndoableMDoexecM makeUndoableM doActionM addUndoerM rollbackMexec makeUndoabledoAction addUndoerrollbackghc-prim GHC.TypesIO runUndoableM runUndoable$fExceptionalMonadIO$fExceptionManualUndo$fMonadUndoableM