extensible-effects-concurrent-0.1.2.2: Message passing concurrency as extensible-effect

Safe HaskellSafe
LanguageHaskell2010

Control.Eff.ExceptionExtra

Description

Add-ons to Exception

Synopsis

Documentation

try :: forall e r a. Member (Exc e) r => Eff r a -> Eff r (Either e a) Source #

Catch an exception and return it in an Either.

liftRethrow :: forall e r a. (Exception e, SetMember Lift (Lift IO) r, Member (Exc e) r) => (SomeException -> e) -> IO a -> Eff r a Source #

Lift an IO action and catch all error using try then wrap the Exception using a given wrapper function and rethrow it using throwError.

runErrorRethrowIO :: forall e r a. (Exception e, SetMember Lift (Lift IO) r) => Eff (Exc e ': r) a -> Eff r a Source #

Run an effect with exceptions like runError and rethrow it as SomeException using throw