Monomorphic comparison operator of Janestreet Base library

It’s intentional; polymorphic compare is shadowed by integer comparison by default in Base. That’s because polymorphic compare, while useful, is error prone, and we think its use should be discouraged. It’s a bigger swing to hide it everywhere in Core, which is used directly in many more places than Base, but I suspect we’ll do that eventually.

You can restore polymorphic comparison if you want to:

open Base
open Poly

let bigger_float = max 1.1 1.0
let bigger_int = max 1 2

Or, you can just use it in a small context:

open Base

let bigger_float = Poly.(max 3.3 4.5)