Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should fix #11. Although with the library will be build with ocaml/dune#2693, OCaml 4.07-4.09 can't use the resulting
stdlib_shims.cmxa
file without ocaml/ocaml#9011 which will require at least OCaml 4.10.0, so a workaround is needed here too.The workaround I've attempted is to duplicate the
Pervasives
module. This has the immediate effect of allowing the deprecation warning from 4.08.0 to be changed so that the stdlib-shims library is not recursively mentioned. On OCaml 4.07 this has no effect (cf. ocaml/ocaml#2041 in 4.08.0), so OCaml 4.07.0 doesn't gain the deprecation warning.The purpose of this library is to provide compatibility with
Stdlib
for OCaml < 4.07.0. In those versions, it's virtually possible to define a module calledPervasives
(that's the purpose of ocaml/ocaml#1010), so if a user usesstdlib-shims
then they have already opted out of being able to shadow standard library modules, and the inclusion of our ownpervasives.cmi
is - I think - safe. It's also the case that if you're using this library, you're meant to be avoiding usingPervasives
completely.