intellij-arend
intellij-arend copied to clipboard
Warn about partially applied infix operators in prefix form
https://arend-lang.github.io/documentation/language-reference/definitions/#infix-operators
According to this section of the documentation, the following 2 usages of +
are equivalent:
\func f => map (3 +) []
\func g => map (+ 3) []
However, it might be surprising that the second usage is not a right section. I am not sure if there are cases when the second usage is preferable to the first one. But if these cases are rare and discouraged, we might have an inspection that detects such cases and either suggests replacing (+ 3)
with a "more preferable" equivalent (3 +)
, or with a proper right section (`+ 3)
.
Did you mean to open an issue in the Arend repo? 🤣
No, I would implement it as an inspection with quick fixes in the plugin)