Skip to content

Warning suggestion: argument not necessarily a binary operator

As an example:

let fn (+) = 1; fn x = 2 in fn 1

The suggested warning is that: if an argument to a function consists entirely of characters which are symbols (all isSymbol), and the type of that argument isn't (a -> b -> c), then produce a warning.

Suggested wording is something along the lines of "Warning: the argument '(+)' isn't necessarily a binary operator, although it looks like one. This may be confusing to readers of your code."

Trac metadata
Trac field Value
Version 6.10.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information