Safe Haskell | None |
---|---|
Language | Haskell98 |
Monad type classes for raising errors and recovering from them.
- class (Applicative μ, Monad μ) => MonadAbort e μ | μ -> e where
- class MonadAbort e μ => MonadRecover e μ | μ -> e where
- onError :: MonadRecover e μ => μ α -> (e -> μ β) -> μ α
- onError_ :: MonadRecover e μ => μ α -> μ β -> μ α
- ignoreErrors :: MonadRecover e μ => μ α -> μ ()
Documentation
class (Applicative μ, Monad μ) => MonadAbort e μ | μ -> e where Source #
Class of monads that support raising of errors.
class MonadAbort e μ => MonadRecover e μ | μ -> e where Source #
Class of monads that support recovery from errors.
onError :: MonadRecover e μ => μ α -> (e -> μ β) -> μ α Source #
Run an action on error, without recovering from it.
onError_ :: MonadRecover e μ => μ α -> μ β -> μ α Source #
Run an action on error (ignoring the error value), without recovering from it.
ignoreErrors :: MonadRecover e μ => μ α -> μ () Source #
Silently recover from all errors.
Orphan instances
MonadRWS r w s μ => MonadRWS r w s (AbortT e μ) Source # | |
MonadReader r μ => MonadReader r (AbortT e μ) Source # | |
MonadState s μ => MonadState s (AbortT e μ) Source # | |
MonadWriter w μ => MonadWriter w (AbortT e μ) Source # | |
Monad μ => MonadError e (AbortT e μ) Source # | |
MonadCont μ => MonadCont (AbortT e μ) Source # | |