Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

effect

effect

effect -- abstract parent feature for effects

effect provides a means to perform effectful operations. Instances
of effect are installed in the current environment while their code is
executed. The code may access the effect via <type>.env.

Functions

replace effect in the current context by this and abort current execution
does this effect support abort?

Redefining this to return `false` helps to detect unexptected calls to
`abort` at runtime and ensure that the static analysis finds that there
code executed with this effect will always return normally and produce
a result. This is used, e.g, in `mutate` to avoid static analysis
reporting `panic` as an effect of the use of a local mutate instance.
abort the current execution and return from the surrounding call to
abortable with result == false.

Type Features

has an effect of the given type been installed?