Agda-2.3.2: A dependently typed functional programming language and proof assistant

Safe Haskell | None

Agda.TypeChecking.Monad.Exception

Description

Basically a copy of the ErrorT monad transformer. It's handy to slap onto TCM and still be a MonadTCM (which isn't possible with ErrorT).

# Documentation

newtype ExceptionT err m a

Constructors

ExceptionT |

Fields

runExceptionT :: m (Either err a)

Instances

(Error err, MonadError err' m) => MonadError err' (ExceptionT err m) |
(Error err, MonadReader r m) => MonadReader r (ExceptionT err m) |
(Error err, MonadState s m) => MonadState s (ExceptionT err m) |
(Monad m, Error err) => MonadException err (ExceptionT err m) |
MonadTrans (ExceptionT err) |
(Monad m, Error err) => Monad (ExceptionT err m) |
Functor f => Functor (ExceptionT err f) |
(Error err, Applicative m, Monad m) => Applicative (ExceptionT err m) |
(Error err, MonadIO m) => MonadIO (ExceptionT err m) |
(Error err, MonadTCM tcm) => MonadTCM (ExceptionT err tcm) |

class Error err => MonadException err m | m -> err where

Methods

throwException :: err -> m a

catchException :: m a -> (err -> m a) -> m a

Instances

MonadException UnifyException Unify |
(Monad m, MonadException err m, Monoid w) => MonadException err (WriterT w m) |
(Monad m, MonadException err m) => MonadException err (ReaderT r m) |
(Monad m, Error err) => MonadException err (ExceptionT err m) |