S0071: wrong effect argument type
Generated from rellum-diagnostics/src/db.rs.
Explanation
Each built-in effect has a concrete signature. The compiler checks argument types statically so runtime effects receive handles, paths, ports, and payloads in the representation they expect.
Common causes
- passing a String where a file or socket handle Int is required
- passing an Int where a path or environment variable name String is required
- using the wrong payload type for network or file effects
Canonical fixes
- pass a value with the effect's required type
Before:
read!("build/input.txt")
After:
file ~ request open!("build/input.txt")
on ok(h) => h
on err(_) => 0
initial => 0
main! = read!(file)
- convert or compute the expected argument before the effect call
Code example
read!("build/input.txt")