I’m using the Core library in a project, and recently when I upgraded my OCaml from 4.08.1 to 4.10.0, plenty of compilation errors suddenly appear for comparison expressions like:
if (xs = ) then ... or
if (x = true) then ...
I saw that this change was discussed in this thread about monomorphic comparison operators in Base, but did not expect that Core would make it a default behavior.
So I’d like to ask since which version that Core removed such polymorphic comparison operators?
(I couldn’t find it in release notes of Core)
Also, if I define a sum type like
type ternary = True | False | Unkn, what will be a correct way to write
if (x = True) then ... (which is allowed in the new Core)?
I can temporarily fix by writing
if (x == True) then ..., but using
== doesn’t seem correct, since
== is about comparing physical objects…
Thanks for spending your time to check my question.