transient-0.1.0.2: A monad for extensible effects and primitives for unrestricted composability of applications

Safe HaskellNone
LanguageHaskell2010

Transient.Backtrack

Description

Synopsis

Documentation

registerUndo :: TransientIO a -> TransientIO a Source

register an action that will be executed when backtracking

onUndo :: TransientIO a -> TransientIO a -> TransientIO a Source

the secod parameter will be executed when backtracking

undo :: TransientIO a Source

execute backtracking. It execute the registered actions in reverse order.

If the backtracking flag is changed the flow proceed forward from that point on.

If the backtrack stack is finished or undoCut executed, undo will stop.

retry :: TransientIO () Source

restart the flow forward from this point on

undoCut :: TransientIO () Source

assures that backtracking will not go further back