Are comparisons in OCaml no longer polymorphic?

Viewed 57

I have been trying to migrate a codebase from OCaml 4.04 to OCaml 4.10. I have been running into a recurring error in which when I compare values that are not integers, I get a type error:

if (total < current) then (...)

90 |             if (total < current) then (...)
                     ^^^^^
Error: This expression has type float but an expression was expected of type
         int

But replacing it with if Float.(total < current) fixes the issue. Am I doing something wrong, or is it that comparisons in OCaml are no longer polymorphic?

1 Answers
Related