HaskellWorks.Polysemy.Error
module HaskellWorks.Error
trap :: forall e r a. (e -> Sem r a) -> Sem (Error e ': r) a -> Sem r a Source #
Run a computation that may fail, and handle the error case. Unlike catch from Error this function removes the Error effect from the stack.
catch
Error
trap_ :: forall e r a. Sem r a -> Sem (Error e ': r) a -> Sem r a Source #
Like trap, but the error is not passed to the handler.
trap