heftia-effects-0.7.0.0: higher-order algebraic effects done right
Copyright(c) 2023 Sayo contributors
LicenseMPL-2.0 (see the LICENSE file)
Maintainerymdfield@outlook.jp
Safe HaskellNone
LanguageGHC2021

Control.Monad.Hefty.Except

Description

Interpreters for the Except effects.

Synopsis

Documentation

runCatch :: forall e (es :: [Effect]) a. (In (Throw e) es, FOEs es) => Eff (Catch e ': es) a -> Eff es a Source #

Interpret the Catch effect.

runExcept :: forall e (es :: [Effect]) a. FOEs es => Eff (Catch e ': (Throw e ': es)) a -> Eff es (Either e a) Source #

Interpret the Throw/Catch effects.

runThrow :: forall e (es :: [Effect]) a. FOEs es => Eff (Throw e ': es) a -> Eff es (Either e a) Source #

Interpret the Throw effect.

handleThrow :: forall e (f :: Type -> Type) (g :: Type -> Type) a. Applicative g => AlgHandler (Throw e) f g (Either e a) Source #

A handler for the Throw effect.

handleCatch :: forall e (es :: [Effect]). (In (Throw e) es, FOEs es) => Catch e ~~> Eff es Source #

A handler for the Catch effect.