Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ExceptIOT e m a = ExceptIOT {
- unsafeRunExceptIOT :: m a
- runExceptIOT :: (Exception e, MonadUnliftIO m) => ExceptIOT e m a -> m (Either e a)
- module Control.Monad.Error.Class
- modifyError :: (Exception e, MonadUnliftIO m, MonadError e' m) => (e -> e') -> ExceptIOT e m a -> m a
Documentation
newtype ExceptIOT e m a Source #
This type is useful for providing a MonadError
constraint to an IO
action for a given type. It can replace ExceptT
.
Note that catchError
will use the behavior from UnliftIO - so catch won't
catch an asynchronous exception.
Since: 0.1.0.0
ExceptIOT | |
|
Instances
runExceptIOT :: (Exception e, MonadUnliftIO m) => ExceptIOT e m a -> m (Either e a) Source #
Run an ExceptIOT
action. This catches the thrown exception, but only if
it is the e
that the type mentions. All other exceptions will remain
uncaught.
Since: 0.1.0.0
module Control.Monad.Error.Class
modifyError :: (Exception e, MonadUnliftIO m, MonadError e' m) => (e -> e') -> ExceptIOT e m a -> m a Source #
Like modifyError
, but it selects the ExceptIOT
instance for IO
exceptions instead of the ExceptT
instance with an Either
error.
Since: 0.1.0.0