diff options
| author | Emilio Jesus Gallego Arias | 2018-10-16 01:28:36 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2018-10-16 13:25:03 +0200 |
| commit | 33c93006b7685092b5239ea001058578fac3552f (patch) | |
| tree | 49b94d72ee9d52a1355d478b6081d3f9bc404b40 /toplevel | |
| parent | 697a59de8a39f3a4b253ced93ece1209b7f0eb1b (diff) | |
[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.
Diffstat (limited to 'toplevel')
| -rw-r--r-- | toplevel/coqargs.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toplevel/coqargs.ml b/toplevel/coqargs.ml index 06d9ba3436..9918adfed3 100644 --- a/toplevel/coqargs.ml +++ b/toplevel/coqargs.ml @@ -244,7 +244,7 @@ let get_float opt n = prerr_endline ("Error: float expected after option "^opt); exit 1 let get_host_port opt s = - match CString.split ':' s with + match String.split_on_char ':' s with | [host; portr; portw] -> Some (Spawned.Socket(host, int_of_string portr, int_of_string portw)) | ["stdfds"] -> Some Spawned.AnonPipe @@ -255,7 +255,7 @@ let get_host_port opt s = let get_error_resilience opt = function | "on" | "all" | "yes" -> `All | "off" | "no" -> `None - | s -> `Only (CString.split ',' s) + | s -> `Only (String.split_on_char ',' s) let get_priority opt s = try CoqworkmgrApi.priority_of_string s |
