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

Control.Monad.Hefty.Except

Description

Interpreters for the Except effects.

Synopsis

Documentation

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

Interpret the Catch effect.

runExcept :: forall e es 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 a. FOEs es => Eff (Throw e ': es) a -> Eff es (Either e a) Source #

Interpret the Throw effect.

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

A handler for the Throw effect.

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

A handler for the Catch effect.