|
Control.Monad.Resumable | Portability | non-portable (GHC extensions) | Stability | experimental | Maintainer | nicolas.frisby@gmail.com |
|
|
|
|
|
Description |
A monad transformer for resumable exceptions. The ResumableT transformer is
isomorphic to ReactT, the dominant reactivity monad in the literature. The
differences serve to match the mtl style.
|
|
Synopsis |
|
|
|
|
Monadic interface
|
|
class Monad m => MonadResumable req res m | m -> req res where | Source |
|
A monadic interface for resumable exceptions.
| | Methods | yield :: req -> (res -> m a) -> m a | Source |
| Raise the exception: a request and a resumption to use if the request
can be handled.
| | handle :: m a -> (req -> (res -> m a) -> m a) -> m a | Source |
| Installs a handler to quiesce an exception before it percolates to the
higher-level handlers.
|
| | Instances | |
|
|
Monad transformer
|
|
|
|
newtype ResumableT scope req res m a | Source |
|
Constructors | | Instances | |
|
|
Run functions
|
|
|
The preferred top-level interface nevers allows exceptions to go
unhandled.
|
|
|
This variation recognizes that the handling of requests primarily
involves generating responses.
|
|
|
The handler does not depend on the inner monad.
|
|
|
The responder does not depend on the inner monad.
|
|
Scope manipulation
|
|
|
Instances | |
|
|
|
Instances | |
|
|
|
Establishes static scoping as default.
|
|
|
Establishes dynamic scoping as default.
|
|
|
|
|
|
Manipulating the inner monad
|
|
|
This manipulation of the inner monad acheives static scoping -- the
manipulation is not preserved in the resumption.
|
|
|
This manipulation of the inner monad acheives dynamic scoping -- the
manipulation is preserved in the resumption.
|
|
Produced by Haddock version 2.6.0 |