Recent mail on the OCaml list led me to a language feature whose definition in the manual I find obscure. I believe that I know how it works and I describe it without the official terminology which I find obscure and ambiguous.

People are often surprised at the failure of the following program:

let f () =
let id : 'a -> 'a = fun x -> x in
(id 1, id 1.2);;
In this program “id : 'a -> 'a = fun x -> x” is a let-binding as extended is section 7.12 of this. “'a -> 'a” therein is a poly-typexpr which is a typexpr with a new (as of 3.12) possible syntax that is not used in our example. What this pattern means is that there exists some type such that the new function bound to id takes an argument of that type and returns a value of the same type. When the expressions “id 1” is encountered during compilation it is concluded that the aforementioned type is “int”—thus the conflict with “id 1.2”.

We may adopt the new syntax for typexpr and then we have a program:

let f () =
let id : 'a. 'a -> 'a = fun x -> x in
(id 1, id 1.2);;
whereafter we have:
  f ();;
- : int * float = (1, 1.2)
Here the