S0021: effect sequencing in pure expression
Generated from rellum-diagnostics/src/db.rs.
Explanation
The -> operator sequences effect calls during Fire. Pure expressions compute values and cannot schedule effect order, so -> is only valid inside effect expressions.
Common causes
- using -> in a = binding or pure function body
- trying to chain values with effect sequencing syntax
- placing an effect chain inside feedback instead of an effect binding
Canonical fixes
- move the sequence into an effect binding
Before:
value = print!(a) -> print!(b)
After:
main! = print!(a) -> print!(b)
- use ordinary pure expression syntax for value computation
Code example
value = print!(a) -> print!(b)