definitive-base-1.0: The base modules of the Definitive framework.

Safe HaskellNone

Algebra.Monad.Error

Contents

Synopsis

The MonadError class

class Monad m => MonadError e m | m -> e whereSource

Methods

throw :: e -> m aSource

catch :: (e -> m a) -> m a -> m aSource

try :: MonadError e m => m a -> m a -> m aSource

(!+) :: MonadError Void m => m a -> m a -> m aSource

tryMay :: MonadError e m => m a -> m (Maybe a)Source

throwIO :: Exception e => e -> IO ()Source

The Either transformer

data EitherT e m a Source

Instances

_eitherT :: Functor m => Iso (EitherT e m a) (EitherT f m b) (m (e :+: a)) (m (f :+: b))Source