Skip to content

Commit

Permalink
Merge pull request #124 from kit-ty-kate/414
Browse files Browse the repository at this point in the history
Add support for OCaml 4.14
  • Loading branch information
aalekseyev authored Nov 22, 2021
2 parents e9dc05f + adece72 commit 83a70d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions compiler-stdlib/gen/gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ 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
Expand All @@ -28,6 +29,7 @@ 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) =
Expand Down Expand Up @@ -86,6 +88,10 @@ let () =
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"
;;
2 changes: 2 additions & 0 deletions src/base.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ include (
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
Expand All @@ -55,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
Expand Down
2 changes: 1 addition & 1 deletion src/import0.ml
Original file line number Diff line number Diff line change
Expand Up @@ -109,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 *)

Expand Down

0 comments on commit 83a70d1

Please sign in to comment.