This effect abstracts the throwing and catching of errors, leaving it up to the interpreter whether to use exceptions or monad transformers like ExceptT to perform the short-circuiting mechanism.
Modulepolysemy-1.9.2.0Haskell2010
Polysemy.Error
- 1 type
- 15 values
- Packagepolysemy-1.9.2.0
- Exports16
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceError.hs
Effect
1 declarationActions
12 declarationsShort-circuit the current program using the given error value.
Recover from an error that might have been thrown in the higher-order action given by the first argument by passing the error to the handler given by the second argument.
A combinator doing embed and fromEither at the same time. Useful for interoperating with IO.
Like fromException, but with the ability to transform the exception before turning it into an Error.
Like fromExceptionSem, but with the ability to transform the exception before turning it into an Error.
value
catchJust Interpretations
3 declarationsTransform one Error into another. This function can be used to aggregate multiple errors into a single type.