Run a computation which can throw errors with a handler to run on error.
Errors thrown by the handler will escape up to the nearest enclosing catchError (if any). Note that this effect does not handle errors thrown from impure contexts such as IO, nor will it handle exceptions thrown from pure code. If you need to handle IO-based errors, consider if fused-effects-exceptions fits your use case; if not, use liftIO with try or use catch from outside the effect invocation.
AlgebraNonDet []Defined in fused-effects-1.1.2.7 · Control.Algebra
Algebrasigm => Algebrasig (Choosingm)Defined in fused-effects-1.1.2.7 · Control.Effect.Choose
Algebrasigm => Algebrasig (Apm)Defined in fused-effects-1.1.2.7 · Control.Algebra
This instance permits effectful actions to be lifted into the Ap monad
given a monoidal return type, which can provide clarity when chaining calls
to mappend.
mappend <$> act1 <*> (mappend <$> act2 <*> act3)
is equivalent to
getAp (act1 <> act2 <> act3)
Algebrasigm => Algebrasig (Altm)Defined in fused-effects-1.1.2.7 · Control.Algebra
This instance permits effectful actions to be lifted into the Alt monad,
which eases the invocation of repeated alternation with <|>:
Note that if eff is a sum, it will be decomposed into multiple Member constraints. While this technically allows one to combine multiple unrelated effects into a single Has constraint, doing so has two significant drawbacks: