Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the seq package for 4.07+ #1714

Merged
merged 1 commit into from
Dec 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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