Haskell equivalent of Rust's `must-use`?
Opened this issue · 0 comments
edsko commented
Rust bindgen
can (be customized to) annotate certain fields as must-use
:
Some libraries have a common error type, returned by lots of their functions, which needs to be checked after every call. In these cases it's useful to add
#[must_use]
to this type, so the Rust compiler emits a warning when the check is missing.
This makes use of the must-use
annotation supported the Rust compiler.
It might be good idea to support something similar to this in spirit, although of course the Haskell equivalent will look a bit different.