std.effect.error
Implementation of the Error effect
Types
type Error e r a =
| Error e
.. r
The Error effects adds "exceptions" to the Eff monad
Values
Catches an "exception", allowing the effect to continue executing
Throws the error e
let ok_or_throw r : forall r t e . Result e t -> Eff [| error : Error e | r |] t
Moves a Result into the Eff monad
let some_or_throw e o : forall r a e . e -> Option a -> Eff [| error : Error e | r |] a
Eliminates the Error effect and returns a Result