let calculation = (x: float, y: float): float => {
open Js.Math
max_float(abs_float(x) -. abs_float(y), x +. y)
}
Generates the following warnings:
this open statement shadows the value identifier max_float (which is later used)
this open statement shadows the value identifier abs_float (which is later used)
How do I turn off these warnings? In a long program, they make open much less appealing if the increased readability of source is offset by having to check through dozens of warning messages.
A good solution for this instance. The real problem is that max_float and abs_float are also in Pervasives, which is what generates the message. ceil_float (which isn’t in Pervasives) works great with the local open and doesn’t generate any warning.