Safe Haskell | None |
---|---|
Language | Haskell2010 |
- onUndo :: TransientIO a -> TransientIO a -> TransientIO a
- undo :: TransIO a
- retry :: TransIO ()
- undoCut :: TransientIO ()
- registerUndo :: TransientIO a -> TransientIO a
- onBack :: (Typeable b, Show b) => TransientIO a -> (b -> TransientIO a) -> TransientIO a
- back :: (Typeable b, Show b) => b -> TransientIO a
- forward :: (Typeable b, Show b) => b -> TransIO ()
- backCut :: (Typeable reason, Show reason) => reason -> TransientIO ()
- registerBack :: (Typeable b, Show b) => b -> TransientIO a -> TransientIO a
- finish :: Maybe SomeException -> TransIO a
- onFinish :: (Maybe SomeException -> TransIO ()) -> TransIO ()
- onFinish' :: TransIO a -> (Maybe SomeException -> TransIO a) -> TransIO a
- initFinish :: TransientIO ()
- noFinish :: TransIO ()
- checkFinalize :: StreamData a -> TransIO a
- data FinishReason
Documentation
onUndo :: TransientIO a -> TransientIO a -> TransientIO a Source #
undoCut :: TransientIO () Source #
registerUndo :: TransientIO a -> TransientIO a Source #
generalized versions of backtracking with an extra parameter that gives the reason for going back.
onBack :: (Typeable b, Show b) => TransientIO a -> (b -> TransientIO a) -> TransientIO a Source #
The second parameter will be executed when backtracking
back :: (Typeable b, Show b) => b -> 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.
forward :: (Typeable b, Show b) => b -> TransIO () Source #
backtracking is stopped. the exection continues forward from this point on.
backCut :: (Typeable reason, Show reason) => reason -> TransientIO () Source #
Assures that backtracking will not go further back
registerBack :: (Typeable b, Show b) => b -> TransientIO a -> TransientIO a Source #
Register an action that will be executed when backtracking
finalization primitives
finish :: Maybe SomeException -> TransIO a Source #
Trigger the event, so this closes all the resources
onFinish :: (Maybe SomeException -> TransIO ()) -> TransIO () Source #
Set a computation to be called when the finish event happens
onFinish' :: TransIO a -> (Maybe SomeException -> TransIO a) -> TransIO a Source #
Set a computation to be called when the finish event happens this only apply for
initFinish :: TransientIO () Source #
Initialize the event variable for finalization. all the following computations in different threads will share it it also isolate this event from other branches that may have his own finish variable
checkFinalize :: StreamData a -> TransIO a Source #
trigger finish when the stream of data ends
data FinishReason Source #