Skip to content

Commit

Permalink
Merge pull request #1714 from rgrinberg/seq-407
Browse files Browse the repository at this point in the history
Add support for the seq package for 4.07+
  • Loading branch information
rgrinberg authored Dec 28, 2018
2 parents 0b0f703 + 977c63c commit 5aed1d2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ unreleased
- Look for jsoo runtime in the same dir as the `js_of_ocaml` binary
when the ocamlfind package is not available (#1467, @nobj)

- Make the `seq` package available for OCaml >= 4.07 (#1714, @rgrinberg)

1.6.2 (05/12/2018)
------------------

Expand Down
6 changes: 6 additions & 0 deletions src/meta.ml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ let builtins ~stdlib_dir ~version:ocaml_version =
let bytes = dummy "bytes" in
let result = dummy "result" in
let uchar = dummy "uchar" in
let seq = dummy "seq" in
let threads =
{ name = Some (Lib_name.of_string_exn ~loc:None "threads")
; entries =
Expand Down Expand Up @@ -284,6 +285,11 @@ let builtins ~stdlib_dir ~version:ocaml_version =
uchar :: base
else
base in
let base =
if Ocaml_version.stdlib_includes_seq ocaml_version then
seq :: base
else
base in
(* We do not rely on an "exists_if" ocamlfind variable,
because it would produce an error message mentioning
a "hidden" package (which could be confusing). *)
Expand Down
3 changes: 3 additions & 0 deletions src/ocaml_version.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ let stdlib_includes_uchar version =

let stdlib_includes_bigarray version =
version >= (4, 07, 0)

let stdlib_includes_seq version =
version >= (4, 07, 0)
3 changes: 3 additions & 0 deletions src/ocaml_version.mli
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ val stdlib_includes_uchar : t -> bool

(** Whether the standard library includes the [Bigarray] module *)
val stdlib_includes_bigarray : t -> bool

(** Whether the standard library includes the [Seq] module *)
val stdlib_includes_seq : t -> bool

0 comments on commit 5aed1d2

Please sign in to comment.