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.
Precondition
pre
  safety: effect.this.is_instated
0.095dev (GIT hash c0597c5e4454e0a756871b577946c51ba77d9fde)
last changed: 2026-04-14