Incorrect type inference with List.map?

Hello,

I am trying to partially apply List.map with a function that takes a tuple of a’ and returns a boolean. OCaml (wrongly, I believe) infers the type to be (int * int) list -> bool list. Any idea what could be going on?

map

Most likely this is yet again the issue mentioned in Possible bug in Base.List.map. The Base module redefines (=) to have the type int -> int -> bool.

You can read an excellent description of ways to get polymorphic comparison while using Base here: The Base Module and Polymorphic Functions

That does seem to be the cause. Thanks for your help, and thank you for the reading material! For my specific use case, for now, I chose to just convert the list to pairs of ints.