|
|
|
| Description |
| This code has been taken from http://haskell.org
A Monad transformer UndoT on a state supporting undo , redo and hput to push the last state on history.
Redo stack is blanked on hput
|
|
| Synopsis |
|
|
|
| Documentation |
|
|
| State stacks wrapping states in time
| | Constructors | | History | | | current :: s | last state putted
| | undos :: [s] | the history of putted states (reversed) without the redos
| | redos :: [s] | history of the undo
|
|
| Instances | |
|
|
|
| a state monad transformer with the state history
|
|
|
| facility to write signatures context
|
|
|
|
| a wrapper around HStateT to derive his classes and add an instance
| | Constructors | | Instances | |
|
|
|
| :: HCtx m s | | | => UndoT s m Bool | False if the undo stack was empty
| | tries to get back one step the state
|
|
|
|
| :: HCtx m s | | | => UndoT s m Bool | False if the redo stack was empty
| | tries to get back the undo operation
|
|
|
|
| :: HCtx m s | | | => s | the new state to put
| | -> UndoT s m () | monading
| | push the old state in the undo stack and set the new state (alternative to put)
|
|
|
|
| an History of one state
|
|
|
| :: Monad m | | | => UndoT s m a | a UndoT action
| | -> s | the initial state
| | -> m a | the result
| | run the UndoT monad transformer spitting out the computation result in the inner monad
|
|
|
|
| :: Monad m | | | => UndoT s m a | a UndoT action
| | -> s | the initial state
| | -> m s | the final state
| | run the UndoT monad transformer spitting out the final state in the inner monad
|
|
|
| Produced by Haddock version 2.3.0 |