extensible-effects-1.1.0: An Alternative to Monad Transformers

Safe HaskellNone

Control.Eff.Exception

Description

Exception-producing and exception-handling effects

Synopsis

Documentation

newtype Exc e v Source

These are exceptions of the type e. This is akin to the error monad.

Constructors

Exc e 

Instances

throwExc :: (Typeable e, Member (Exc e) r) => e -> Eff r aSource

Throw an exception in an effectful computation.

runExc :: Typeable e => Eff (Exc e :> r) a -> Eff r (Either e a)Source

Run a computation that might produce an exception.

catchExc :: (Typeable e, Member (Exc e) r) => Eff r a -> (e -> Eff r a) -> Eff r aSource

Run a computation that might produce exceptions, and give it a way to deal with the exceptions that come up.