Note: Narrowly targeted Google-food. Skip if you do not program in Standard ML.
Recent versions of Standard ML of New Jersey (SML/NJ) print a message "Warning: calling polyEqual" when you write code that uses polymorphic equality. Here's how to turn it off:
This works in CM mode, as in:
sml -Ccontrol.poly-eq-warn=false -m sources.cm
I am posting this here as Google-food because I just spent an hour Googling and greping around in SML/NJ sources trying to figure this out.
If you're using SML/NJ interactively, then you can also type
Control.polyEqWarn := false
into the read-eval-print loop. However, this doesn't work when you're trying to invoke the SML Compilation manager in "make" mode (-m), because
Control is not present in the default linkage environment. (And the SML/NJ documentation does not specify how to add it; or, at least, I haven't figured it out yet.)
More generally, all control flags (all
bool refs in
Control) can be toggled at the command line. This is documented in the command-line section of the SML Compilation Manager manual. There, we learn that -C can be used to set control parameters. You can get a listing of all control parameters using -S, as follows:
Finally, I just want to remark in passing that unlike, say, "match redundant" or "match nonexhaustive", use of polymorphic equality is purely a performance problem, not a probable logic error. It's therefore highly questionable design to enable a warning message for polymorphic equality by default. The default setting should have been off, but available as a profiling/debugging option.