| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Control.Monad.Except.Catch
Synopsis
- newtype ExceptCatchT e m a = ExceptCatchT {
- unsafeRunExceptCatchT :: m a
- runExceptCatchT :: (Exception e, MonadCatch m) => ExceptCatchT e m a -> m (Either e a)
- module Control.Monad.Error.Class
- modifyError :: (Exception e, MonadCatch m, MonadError e' m) => (e -> e') -> ExceptCatchT e m a -> m a
Documentation
newtype ExceptCatchT e m a Source #
This type is useful for translating a MonadError constraint into
MonadCatch. This type does not have an Either return, which means we can
provide a MonadUnliftIO instance.
Since: 0.1.0.0
Constructors
| ExceptCatchT | |
Fields
| |
Instances
runExceptCatchT :: (Exception e, MonadCatch m) => ExceptCatchT e m a -> m (Either e a) Source #
Run an ExceptCatchT action. This will catch any thrown e exceptions,
regardless of whether you used throwM or throwError.
Any exception that is not mentioned in e will be thrown - this does not
catch all exceptions!
Since: 0.1.0.0
module Control.Monad.Error.Class
modifyError :: (Exception e, MonadCatch m, MonadError e' m) => (e -> e') -> ExceptCatchT e m a -> m a Source #
Like modifyError, but it selects the ExceptCatchT instance for IO
exceptions instead of the ExceptT instance with an Either error.
Since: 0.1.0.0