Abort
eff AbortSourceAn effect used to abort computation with an error message.
Operations
Definitions
Aborts the current computation with the given error message m enriched with a JVM stack trace.
Handles the Abort effect of the given function f by printing the error message and exiting.
In other words, re-interprets the Abort effect using the IO effect.
Note: The returned function can still return normally if abort is never called by f.
Handles the Abort effect of the given function f by converting aborts to Result values.
Returns a function that
Returns Ok(f()) if the computation completes successfully without aborting.
Returns Err(m) if the computation aborts with error message m.
@DefaultHandler Runs the Abort effect of the given function f.
In other words, re-interprets the Abort effect using the IO effect.
Note: This function can still return normally if abort is never called by f.