OCaml 4.14.0 compatibility
This MR adds compatibility with OCaml 4.14.0. It performs three main changes :
-
779e3185 changes the way the compatibility layer with various version of OCaml is compiled. Prior to this commit, we used to have mlcompat_407.ml, mlcompat_408_9.ml, …, mlcompat_413.ml for all supported version. Each contained the same set of 20 or so compatibility functions acting as proxies for the compiler libs functions (whose signature had changed between version). This was an unholy mess as e.g. a could change say between OCaml 4.10 and 4.11 and we would have 3 copies of each version of the function (4.07, 4.08/9 and 4.10 on one hand, and 4.11, 4.12, 4.13 on the other hand). With this change, we have a single file,
mlcompat.cpp.ml
where bits are optionally compiled withcpp
(the C preprocessor). This is not entirely satisfactory, since it adds a silent dependency on cpp (there is noconf-cpp
in opam) but since acc
compiler is mandatory foropam
this is not too bad. The alternatives are not great :
- cppo makes ocamlformat/merlin choke since it's not OCaml syntax
- ppx_optcomp almost fits the bill but introduce a build dependency on janestreet some libraries (base and stdio)