S0006: effect trigger must name an event or Bool graph
Generated from rellum-diagnostics/src/db.rs.
Explanation
An effect binding trigger controls when Fire-phase work runs. Trigger names must be event bindings or Bool-valued graph nodes; other values do not define a valid firing condition.
Common causes
- misspelling an event name in an effect trigger
- triggering an effect from an Int, String, record, or enum value
- using a local function or type name as a trigger
Canonical fixes
- trigger on an event binding
Before:
main! on count => print!(count)
After:
press = event(button!())
main! on press => print!(count)
- derive a Bool graph when the effect should be conditionally level-triggered
Before:
main! on count => print!(count)
After:
has_count = count > 0
main! on has_count => print!(count)
Code example
main! on count => print!(count)