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

replace

effect.type.replace

(e effect.this.type)
 => 
unit
replace existing effect for type `effect.this` by the new effect value `e`.

For effects that model the outside world (e.g., i/o, time, sensors and actuators, etc.),
the effect might be a unit type, so the replace is effectively a no-operation. However,
the call to `replace` is used ot model the change of the outside world and must be
included for analysis tools to appreciate this.

replace may only be called during the execution of an operation of a currently instated
effect of the same effect type.

NYI: BUG: It is currently not enforced that replace is only called during the execution
of an operation of a currently instated effect of the same effect type.
0.095dev (2025-08-15 12:02:22 GIT hash 301b5b75e77076d091b38f555473f9f0e31e5b5c built by fridi@fzen)