A monad transformer that adds exceptions to other monads.
ExceptT constructs a strict monad parameterized over two
things:
- e - An arbitrary exception type.
- m - The inner monad.
The monadic computations are a plain values. They are unrelated to the
Control.Exception mechanism, which is tied to the
IO
monad.
The
return function yields a computation that produces the
given value, while
>>= sequences two subcomputations,
exiting on the first exception.