incipit-core
Safe HaskellNone
LanguageGHC2021

Incipit.Exception

Description

Combinators that catch exceptions in IO and embed them into Sem.

Synopsis

Documentation

tryIOE :: forall e (r :: EffectRow) a. (Exception e, Member (Embed IO) r) => IO a -> Sem r (Either e a) Source #

Run an IO via Embed and catch exceptions of type e, returning Either. Unlike all other combinators, this doesn't convert the exception to Text.

tryIO :: forall e (r :: EffectRow) a. (Exception e, Member (Embed IO) r) => IO a -> Sem r (Either Text a) Source #

Run an IO via Embed and catch exceptions of type e, returning Either.

tryIOError :: forall (r :: EffectRow) a. Member (Embed IO) r => IO a -> Sem r (Either Text a) Source #

Run an IO via Embed and catch IOError, returning Either.

tryAny :: forall (r :: EffectRow) a. Member (Embed IO) r => IO a -> Sem r (Either Text a) Source #

Run an IO via Embed and catch all exceptions, returning Either.

tryIOMaybe :: forall e (r :: EffectRow) a. (Exception e, Member (Embed IO) r) => IO a -> Sem r (Maybe a) Source #

Run an IO via Embed and catch exceptions of type e, returning Maybe.

tryIOErrorMaybe :: forall (r :: EffectRow) a. Member (Embed IO) r => IO a -> Sem r (Maybe a) Source #

Run an IO via Embed and catch IOError, returning Maybe.

tryMaybe :: forall (r :: EffectRow) a. Member (Embed IO) r => IO a -> Sem r (Maybe a) Source #

Run an IO via Embed and catch all exceptions, returning Maybe.

tryIO_ :: forall e (r :: EffectRow). (Exception e, Member (Embed IO) r) => IO () -> Sem r () Source #

Run an IO via Embed and catch and ignore exceptions of type e.

tryIOError_ :: forall (r :: EffectRow). Member (Embed IO) r => IO () -> Sem r () Source #

Run an IO via Embed and catch and ignore IOError.

tryAny_ :: forall (r :: EffectRow). Member (Embed IO) r => IO () -> Sem r () Source #

Run an IO via Embed and catch and ignore all exceptions.

ignoreException :: forall (r :: EffectRow). Member (Embed IO) r => IO () -> Sem r () Source #

Deprecated: renamed to tryAny_

Run an IO via Embed and catch and ignore all exceptions.