From 0107909dc68b1ad67ec09f355e07c61fbe221895 Mon Sep 17 00:00:00 2001
From: ygrek <ygrek@autistici.org>
Date: Sun, 27 May 2018 21:10:45 -0700
Subject: [PATCH 07/11] sync stdlib to 4.07 (*_seq)
---
src/extArray.mli | 7 +++++++
src/extBuffer.mli | 8 ++++++++
src/extList.mli | 6 ++++++
src/extString.mli | 7 +++++++
4 files changed, 28 insertions(+)
diff --git a/src/extArray.mli b/src/extArray.mli
index c21d324..0188c24 100644
--- a/src/extArray.mli
+++ b/src/extArray.mli
@@ -164,4 +164,11 @@ sig
external unsafe_get : 'a array -> int -> 'a = "%array_unsafe_get"
external unsafe_set : 'a array -> int -> 'a -> unit = "%array_unsafe_set"
+#ifdef OCAML4_07
+ (** [*_seq] functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions *)
+ val to_seq : 'a array -> 'a Seq.t
+ val to_seqi : 'a array -> (int * 'a) Seq.t
+ val of_seq : 'a Seq.t -> 'a array
+#endif
+
end
diff --git a/src/extBuffer.mli b/src/extBuffer.mli
index 898ada9..7a90e58 100644
--- a/src/extBuffer.mli
+++ b/src/extBuffer.mli
@@ -81,4 +81,12 @@ val add_utf_16be_uchar : t -> Uchar.t -> unit
#endif
+#ifdef OCAML4_07
+(** [*_seq] functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions *)
+val to_seq : t -> char Seq.t
+val to_seqi : t -> (int * char) Seq.t
+val add_seq : t -> char Seq.t -> unit
+val of_seq : char Seq.t -> t
+#endif
+
end
diff --git a/src/extList.mli b/src/extList.mli
index c53a73b..0d3fbea 100644
--- a/src/extList.mli
+++ b/src/extList.mli
@@ -245,6 +245,12 @@ module List :
@since 4.02.0 *)
#endif
+#ifdef OCAML4_07
+ (** [*_seq] functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions *)
+ val to_seq : 'a list -> 'a Seq.t
+ val of_seq : 'a Seq.t -> 'a list
+#endif
+
(** {6 Exceptions} *)
exception Empty_list
diff --git a/src/extString.mli b/src/extString.mli
index 322775e..4e0119c 100644
--- a/src/extString.mli
+++ b/src/extString.mli
@@ -206,6 +206,13 @@ module String :
val compare : t -> t -> int
val equal : t -> t -> bool
+#ifdef OCAML4_07
+ (** [*_seq] functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions *)
+ val to_seq : t -> char Seq.t
+ val to_seqi : t -> (int * char) Seq.t
+ val of_seq : char Seq.t -> t
+#endif
+
(**/**)
external unsafe_get : string -> int -> char = "%string_unsafe_get"
--
2.15.1