Skip to content

Commit e9dc05f

Browse files
authored
Merge pull request #98 from kit-ty-kate/412
OCaml 4.12 support
2 parents b333879 + ae78526 commit e9dc05f

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

compiler-stdlib/gen/gen.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Ocaml_version : sig
55

66
val v407 : t
77
val v408 : t
8+
val v412 : t
89
val current : t
910
val compare : t -> t -> int
1011
end = struct
@@ -26,6 +27,7 @@ end = struct
2627

2728
let v407 = parse "4.07"
2829
let v408 = parse "4.08"
30+
let v412 = parse "4.12"
2931
let current = parse Sys.ocaml_version
3032

3133
let compare ((a1, b1) : t) ((a2, b2) : t) =
@@ -80,6 +82,10 @@ let () =
8082
pr "module Result = struct end";
8183
pr "module Unit = struct end";
8284
pr "module Fun = struct end");
85+
if Ocaml_version.(compare current v412) < 0
86+
then (
87+
pr "module Atomic = struct end";
88+
pr "module Either = struct end");
8389
pr "";
8490
pr "exception Not_found = Not_found"
8591
;;

src/base.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ include (
3939
end
4040
(* Modules defined in Base *)
4141
with module Array := Shadow_stdlib.Array
42+
with module Atomic := Shadow_stdlib.Atomic
4243
with module Bool := Shadow_stdlib.Bool
4344
with module Buffer := Shadow_stdlib.Buffer
4445
with module Bytes := Shadow_stdlib.Bytes
4546
with module Char := Shadow_stdlib.Char
47+
with module Either := Shadow_stdlib.Either
4648
with module Float := Shadow_stdlib.Float
4749
with module Hashtbl := Shadow_stdlib.Hashtbl
4850
with module Int := Shadow_stdlib.Int

src/import0.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ include (
1313
with type ('a, 'b, 'c, 'd, 'e, 'f) format6 := ('a, 'b, 'c, 'd, 'e, 'f) format6
1414
(* These modules are redefined in Base *)
1515
with module Array := Shadow_stdlib.Array
16+
with module Atomic := Shadow_stdlib.Atomic
1617
with module Bool := Shadow_stdlib.Bool
1718
with module Buffer := Shadow_stdlib.Buffer
1819
with module Bytes := Shadow_stdlib.Bytes
1920
with module Char := Shadow_stdlib.Char
21+
with module Either := Shadow_stdlib.Either
2022
with module Float := Shadow_stdlib.Float
2123
with module Hashtbl := Shadow_stdlib.Hashtbl
2224
with module Int := Shadow_stdlib.Int

0 commit comments

Comments
 (0)