SimpleH-1.2: A light, clean and powerful Haskell utility library

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 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