Copyright | (c) 2016-2017 Red Hat Inc. |
---|---|
License | LGPL |
Maintainer | https://github.com/weldr |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Functions to help with errors
- errorToEither :: MonadError e m => m a -> m (Either e a)
- errorToMaybe :: MonadError e m => m a -> m (Maybe a)
- mapError :: MonadError e' m => (e -> e') -> ExceptT e m a -> m a
Documentation
errorToEither :: MonadError e m => m a -> m (Either e a) Source #
Convert an error action into an Either
This is essentially runExceptT
generalized to MonadError
errorToMaybe :: MonadError e m => m a -> m (Maybe a) Source #
Convert an error into into nothing