diff options
| author | Emilio Jesus Gallego Arias | 2018-10-02 15:59:06 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2018-10-02 16:00:22 +0200 |
| commit | 87d5e79baea4f3679a1429d2a2e128b564eec5d5 (patch) | |
| tree | b8c6f4999bbb806bcceaec22fbe482a839246cfd /plugins | |
| parent | e65d160d5fa4e0b8b5754b0925b0b5a880523bc5 (diff) | |
[ocaml] [lib] Remove some compatibility layers for OCaml < 4.03.0
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/extraction/common.ml | 9 | ||||
| -rw-r--r-- | plugins/extraction/haskell.ml | 6 | ||||
| -rw-r--r-- | plugins/extraction/table.ml | 9 |
3 files changed, 6 insertions, 18 deletions
diff --git a/plugins/extraction/common.ml b/plugins/extraction/common.ml index f235bb8986..d413cd1e6d 100644 --- a/plugins/extraction/common.ml +++ b/plugins/extraction/common.ml @@ -112,17 +112,12 @@ let pseudo_qualify = qualify "__" let is_upper s = match s.[0] with 'A' .. 'Z' -> true | _ -> false let is_lower s = match s.[0] with 'a' .. 'z' | '_' -> true | _ -> false -[@@@ocaml.warning "-3"] (* String.(un)capitalize_ascii since 4.03.0 GPR#124 *) -let capitalize = String.capitalize -let uncapitalize = String.uncapitalize -[@@@ocaml.warning "+3"] - -let lowercase_id id = Id.of_string (uncapitalize (ascii_of_id id)) +let lowercase_id id = Id.of_string (String.uncapitalize_ascii (ascii_of_id id)) let uppercase_id id = let s = ascii_of_id id in assert (not (String.is_empty s)); if s.[0] == '_' then Id.of_string ("Coq_"^s) - else Id.of_string (capitalize s) + else Id.of_string (String.capitalize_ascii s) type kind = Term | Type | Cons | Mod diff --git a/plugins/extraction/haskell.ml b/plugins/extraction/haskell.ml index e6234c1452..97fe9f24d5 100644 --- a/plugins/extraction/haskell.ml +++ b/plugins/extraction/haskell.ml @@ -21,10 +21,8 @@ open Mlutil open Common (*s Haskell renaming issues. *) -[@@@ocaml.warning "-3"] (* String.(un)capitalize_ascii since 4.03.0 GPR#124 *) -let pr_lower_id id = str (String.uncapitalize (Id.to_string id)) -let pr_upper_id id = str (String.capitalize (Id.to_string id)) -[@@@ocaml.warning "+3"] +let pr_lower_id id = str (String.uncapitalize_ascii (Id.to_string id)) +let pr_upper_id id = str (String.capitalize_ascii (Id.to_string id)) let keywords = List.fold_right (fun s -> Id.Set.add (Id.of_string s)) diff --git a/plugins/extraction/table.ml b/plugins/extraction/table.ml index e05e82af6f..6ee1770a4e 100644 --- a/plugins/extraction/table.ml +++ b/plugins/extraction/table.ml @@ -22,11 +22,6 @@ open Util open Pp open Miniml -[@@@ocaml.warning "-3"] (* String.capitalize_ascii since 4.03.0 GPR#124 *) -let capitalize = String.capitalize -[@@@ocaml.warning "+3"] - - (** Sets and maps for [global_reference] that use the "user" [kernel_name] instead of the canonical one *) @@ -61,7 +56,7 @@ let is_modfile = function | _ -> false let raw_string_of_modfile = function - | MPfile f -> capitalize (Id.to_string (List.hd (DirPath.repr f))) + | MPfile f -> String.capitalize_ascii (Id.to_string (List.hd (DirPath.repr f))) | _ -> assert false let is_toplevel mp = @@ -784,7 +779,7 @@ let file_of_modfile mp = let add_blacklist_entries l = blacklist_table := - List.fold_right (fun s -> Id.Set.add (Id.of_string (capitalize s))) + List.fold_right (fun s -> Id.Set.add (Id.of_string (String.capitalize_ascii s))) l !blacklist_table (* Registration of operations for rollback. *) |
