Closed dra27 closed 8 years ago
The compatibility modules should be renamed to something like Compat402, Compact403 since they are not about one specific module in stdlib but rather about adding a compatibility layer for a specific old version.
OK - technically speaking the Compat402 (what is presently BytesCompat) contains a definition of |>
which is actually Compat401 - I assume you're OK with that, rather than adding a third compatibility module for that one-liner?
I assume you're OK
Yes.
I was also wondering if it would simplify the Makefile to simply concatenate in a rule the required Compat* (depending on the version of OCaml) into a single Compat.ml, and include that one in coff.ml.
Yes, it does simplify the Makefile greatly!
It would be cleaner I think to squash these three commits before merging? Let me know if you're happy with the changes, and I'll force push a single squashed commit to this PR.
Yes, the current changeset looks very good. Can you indeed squash and add a line in the changelog? Thanks!
I edited your line in CHANGES
for the modernisation, rather than adding a separate one.
Further fixes to the package_src
target probably clearer in a separate (tiny!) PR
Thanks again!
Apropos of #20, this commit adds complete build compatibility for 3.11.0 onwards. My opinion - which I expect matches yours - is that this can be kept until such point as a language feature is used where back-porting becomes non-trivial, and then it can be completely removed.
The code in
StringCompat.ml
is lifted straight out of OCaml 4.03.0 (I'm assuming licence compatibility/permission to do that?)Makefile
tests ocamlopt -version each time and uses a cookie to detect changes in the compiler (for example, if using opam to switch between multiple compilers...) and regenerates the files.I've tested it with 3.11.0, 4.02.3 and 4.03.0 - it'll get a bit more battle testing shortly!