summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Dimino <jeremie@dimino.org>2018-08-28 16:25:45 +0100
committerJeremie Dimino <jeremie@dimino.org>2018-08-28 16:25:45 +0100
commit7cf321a3cf51134a185198955fc6aef3a400fb3a (patch)
treeb00b3c3b1b1a81dc17f626d54bb995c5a1b61e1a
parent84821420b5f0754edb838f040baeaafbd521aa68 (diff)
downloadocaml-7cf321a3cf51134a185198955fc6aef3a400fb3a.tar.gz
Update the deprecation message for Stdlib.Pervasives
Make it point to stdlib-shims
-rw-r--r--stdlib/stdlib.mli5
-rw-r--r--testsuite/tests/lib-stdlib/pervasives_deprecated.ml9
2 files changed, 13 insertions, 1 deletions
diff --git a/stdlib/stdlib.mli b/stdlib/stdlib.mli
index d451bba9c2..8f6af81ddc 100644
--- a/stdlib/stdlib.mli
+++ b/stdlib/stdlib.mli
@@ -1267,7 +1267,10 @@ module Oo = Oo
module Option = Option
module Parsing = Parsing
module Pervasives = Pervasives
-[@@deprecated "Use Stdlib instead."]
+[@@deprecated "Use Stdlib instead.\n\
+\n\
+If you need to stay compatible with OCaml < 4.07, you can use the \n\
+stdlib-shims library: https://github.com/ocaml/stdlib-shims"]
module Printexc = Printexc
module Printf = Printf
module Queue = Queue
diff --git a/testsuite/tests/lib-stdlib/pervasives_deprecated.ml b/testsuite/tests/lib-stdlib/pervasives_deprecated.ml
index c1d3b5a968..e514cff141 100644
--- a/testsuite/tests/lib-stdlib/pervasives_deprecated.ml
+++ b/testsuite/tests/lib-stdlib/pervasives_deprecated.ml
@@ -11,6 +11,9 @@ Line 3, characters 0-14:
^^^^^^^^^^^^^^
Error (warning 3): deprecated: module Stdlib.Pervasives
Use Stdlib instead.
+
+If you need to stay compatible with OCaml < 4.07, you can use the
+stdlib-shims library: https://github.com/ocaml/stdlib-shims
|}]
module X = Pervasives;;
@@ -20,6 +23,9 @@ Line 1, characters 11-21:
^^^^^^^^^^
Error (warning 3): deprecated: module Stdlib.Pervasives
Use Stdlib instead.
+
+If you need to stay compatible with OCaml < 4.07, you can use the
+stdlib-shims library: https://github.com/ocaml/stdlib-shims
|}]
open Pervasives;;
@@ -29,4 +35,7 @@ Line 1, characters 5-15:
^^^^^^^^^^
Error (warning 3): deprecated: module Stdlib.Pervasives
Use Stdlib instead.
+
+If you need to stay compatible with OCaml < 4.07, you can use the
+stdlib-shims library: https://github.com/ocaml/stdlib-shims
|}]