Safe Haskell | None |
---|---|
Language | Haskell2010 |
See Control.Monad.Except.
- class Monad m => MonadExcept tag e m | m tag -> e where
- type Except tag e = ExceptT tag e Identity
- runExcept :: proxy tag -> Except tag e a -> Either e a
- data ExceptT tag e m a
- exceptT :: proxy tag -> m (Either e a) -> ExceptT tag e m a
- runExceptT :: proxy tag -> ExceptT tag e m a -> m (Either e a)
- handleT :: Functor m => proxy tag -> (e -> a) -> ExceptT tag e m a -> m a
- handle :: proxy tag -> (e -> a) -> Except tag e a -> a
MonadExcept class
class Monad m => MonadExcept tag e m | m tag -> e where Source
See MonadError
.
throw :: proxy tag -> e -> m a Source
Is used within a monadic computation to begin exception processing.
catch :: proxy tag -> m a -> (e -> m a) -> m a Source
A handler function to handle previous exceptions and return to normal execution.
(LiftCatch t, Monad (t m), MonadExcept tag e m) => MonadExcept tag e (t m) Source | |
MonadExcept tag e m => MonadExcept tag e (WrappedEther tag' m) Source | |
Monad m => MonadExcept tag e (ExceptT tag e m) Source |
The Except monad
runExcept :: proxy tag -> Except tag e a -> Either e a Source
Runs an Except
and returns either an exception or a normal value.
The ExceptT monad transformer
The exception monad transformer.
The return
function returns a normal value, while >>=
exits on
the first exception.
exceptT :: proxy tag -> m (Either e a) -> ExceptT tag e m a Source
Constructor for computations in the exception monad transformer.
runExceptT :: proxy tag -> ExceptT tag e m a -> m (Either e a) Source
Runs an ExceptT
and returns either an exception or a normal value.