Fuzion Logo
flang.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.

replace effect in the current context by this and abort current execution

execute code provided in f.call while this effect is installed
in the current environment. Return immediately in case abort is
called.

NYI: uses type parameter T only to simplify C backend

set default effect in the current context to this if none is installed

replace effect in the current context by this

abort the current execution and return from the surrounding call to
abortable with result == false.

execute the code of 'f' in the context of this effect

install this effect and run code.

NYI: Currently, there is no direct way to return a result value
from the code.