I’m looking through the Resto code and I’m seeing the following line:
pp: 'a. 'a Encoding.t -> Format.formatter -> string -> unit ;
I’m searching through the OCaml documentation and cannot find what that trailing .
in 'a.
means.
I’m looking through the Resto code and I’m seeing the following line:
pp: 'a. 'a Encoding.t -> Format.formatter -> string -> unit ;
I’m searching through the OCaml documentation and cannot find what that trailing .
in 'a.
means.
https://caml.inria.fr/pub/docs/manual-ocaml/types.html
Search for “poly-typeexpr”. It’s an explicitly-polymorphic type.
The manual chapter on polymorphism explains some of the use of those annotations in recursion or higher-rank polymorphic functions.