From 33c93006b7685092b5239ea001058578fac3552f Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Tue, 16 Oct 2018 01:28:36 +0200 Subject: [clib] Deprecate string functions available in OCaml 4.05 - `CString.strip -> String.trim` - `CString.split -> String.split_on_char` As noted by @ppedrot there are some small differences on semantics: > OCaml's `trim` also takes line feeds (LF) into account. Similarly, > OCaml's `split` never returns an empty list whereas Coq's `split` > does on the empty string. --- tools/coq_makefile.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml index 0e56cc3c0f..d91c4f0b34 100644 --- a/tools/coq_makefile.ml +++ b/tools/coq_makefile.ml @@ -248,7 +248,7 @@ let rec logic_gcd acc = function let generate_conf_doc oc { defs; q_includes; r_includes } = let includes = List.map (forget_source > snd) (q_includes @ r_includes) in - let logpaths = List.map (CString.split '.') includes in + let logpaths = List.map (String.split_on_char '.') includes in let gcd = logic_gcd [] logpaths in let root = if gcd = [] then @@ -378,8 +378,8 @@ let destination_of { ml_includes; q_includes; r_includes; } file = | _ -> assert false let share_prefix s1 s2 = - let s1 = CString.split '.' s1 in - let s2 = CString.split '.' s2 in + let s1 = String.split_on_char '.' s1 in + let s2 = String.split_on_char '.' s2 in match s1, s2 with | x :: _ , y :: _ -> x = y | _ -> false -- cgit v1.2.3