S0009: effect identifier in pure expression
Generated from rellum-diagnostics/src/db.rs.
Explanation
Names ending in ! identify effects, not pure values. Pure expressions run during Derive and cannot refer to effect identifiers as values because effects are scheduled only from ! bindings, request bindings, or effect wrapper bodies.
Common causes
- using an effect name in a = binding
- passing an effect identifier as a function argument
- confusing an effect wrapper with a function value
Canonical fixes
- call effects from an effect binding
Before:
value = print!
After:
main! = print!("ready")
- use a pure function when a value-level function is needed
Code example
value = print!