summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Glondu <steph@glondu.net>2021-11-28 11:14:47 +0100
committerStephane Glondu <steph@glondu.net>2021-11-28 11:14:47 +0100
commit2b46f99c6c6a8c70d80341374bd3d901ddc12e95 (patch)
treeec07ae23b3c1e3dc076d5092c364e7cfac6b4947
parente68b3d1ddc39ce6b4fc68a92a408b5fecdcf344a (diff)
parentfc26a6b445d102d38b8e5242482ea56f667bbf66 (diff)
Update upstream source from tag 'upstream/0.14.2'
Update to upstream version '0.14.2' with Debian dir d1836afb73072278bc4b5d054f41831d1ff873c6
-rw-r--r--compiler-stdlib/gen/gen.ml12
-rw-r--r--src/base.ml4
-rw-r--r--src/import0.ml4
3 files changed, 19 insertions, 1 deletions
diff --git a/compiler-stdlib/gen/gen.ml b/compiler-stdlib/gen/gen.ml
index a318b6b..10f055f 100644
--- a/compiler-stdlib/gen/gen.ml
+++ b/compiler-stdlib/gen/gen.ml
@@ -5,6 +5,8 @@ module Ocaml_version : sig
val v407 : t
val v408 : t
+ val v412 : t
+ val v414 : t
val current : t
val compare : t -> t -> int
end = struct
@@ -26,6 +28,8 @@ end = struct
let v407 = parse "4.07"
let v408 = parse "4.08"
+ let v412 = parse "4.12"
+ let v414 = parse "4.14"
let current = parse Sys.ocaml_version
let compare ((a1, b1) : t) ((a2, b2) : t) =
@@ -80,6 +84,14 @@ let () =
pr "module Result = struct end";
pr "module Unit = struct end";
pr "module Fun = struct end");
+ if Ocaml_version.(compare current v412) < 0
+ then (
+ pr "module Atomic = struct end";
+ pr "module Either = struct end");
+ if Ocaml_version.(compare current v414) < 0
+ then (
+ pr "module In_channel = struct end";
+ pr "module Out_channel = struct end");
pr "";
pr "exception Not_found = Not_found"
;;
diff --git a/src/base.ml b/src/base.ml
index dafe287..a0fe196 100644
--- a/src/base.ml
+++ b/src/base.ml
@@ -39,12 +39,15 @@ include (
end
(* Modules defined in Base *)
with module Array := Shadow_stdlib.Array
+ with module Atomic := Shadow_stdlib.Atomic
with module Bool := Shadow_stdlib.Bool
with module Buffer := Shadow_stdlib.Buffer
with module Bytes := Shadow_stdlib.Bytes
with module Char := Shadow_stdlib.Char
+ with module Either := Shadow_stdlib.Either
with module Float := Shadow_stdlib.Float
with module Hashtbl := Shadow_stdlib.Hashtbl
+ with module In_channel := Shadow_stdlib.In_channel
with module Int := Shadow_stdlib.Int
with module Int32 := Shadow_stdlib.Int32
with module Int64 := Shadow_stdlib.Int64
@@ -53,6 +56,7 @@ include (
with module Map := Shadow_stdlib.Map
with module Nativeint := Shadow_stdlib.Nativeint
with module Option := Shadow_stdlib.Option
+ with module Out_channel := Shadow_stdlib.Out_channel
with module Printf := Shadow_stdlib.Printf
with module Queue := Shadow_stdlib.Queue
with module Random := Shadow_stdlib.Random
diff --git a/src/import0.ml b/src/import0.ml
index e8fe74e..08a232a 100644
--- a/src/import0.ml
+++ b/src/import0.ml
@@ -13,10 +13,12 @@ include (
with type ('a, 'b, 'c, 'd, 'e, 'f) format6 := ('a, 'b, 'c, 'd, 'e, 'f) format6
(* These modules are redefined in Base *)
with module Array := Shadow_stdlib.Array
+ with module Atomic := Shadow_stdlib.Atomic
with module Bool := Shadow_stdlib.Bool
with module Buffer := Shadow_stdlib.Buffer
with module Bytes := Shadow_stdlib.Bytes
with module Char := Shadow_stdlib.Char
+ with module Either := Shadow_stdlib.Either
with module Float := Shadow_stdlib.Float
with module Hashtbl := Shadow_stdlib.Hashtbl
with module Int := Shadow_stdlib.Int
@@ -107,7 +109,7 @@ module Caml = struct
module Stack = Caml.Stack (** @canonical Caml.Stack *)
- module Stream = Caml.Stream (** @canonical Caml.Stream *)
+ module Stream = Caml.Stream [@ocaml.warning "-3"] (** @canonical Caml.Stream *)
module String = Caml.StdLabels.String (** @canonical Caml.StdLabels.String *)