diff options
author | 2017-05-28 13:34:42 +0200 | |
---|---|---|
committer | 2017-05-28 20:00:47 +0200 | |
commit | b30a6b141fed01a62330051bfb92c19564c93215 (patch) | |
tree | ec73a2a0daf06891572f8117dc42978f1b2e7396 /tools/coqdoc/alpha.ml | |
parent | c53bc951c39b9d4ebcee0128c452fce7c8e4f92f (diff) |
Fail on deprecated warning even for Ocaml > 4.02.3
Deprecations which can't be fixed in 4.02.3 are locally wrapped with
[@@@ocaml.warning "-3"]. The only ones encountered are
- capitalize to capitalize_ascii and variants. Changing to ascii would
break coqdoc -latin1 and maybe other things though.
- external "noalloc" to external [@@noalloc]
Diffstat (limited to 'tools/coqdoc/alpha.ml')
-rw-r--r-- | tools/coqdoc/alpha.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/coqdoc/alpha.ml b/tools/coqdoc/alpha.ml index 3d92c9356..6a6db9556 100644 --- a/tools/coqdoc/alpha.ml +++ b/tools/coqdoc/alpha.ml @@ -8,7 +8,11 @@ open Cdglobals -let norm_char_latin1 c = match Char.uppercase c with +[@@@ocaml.warning "-3"] (* Char.uppercase_ascii since 4.03.0 GPR#124 *) +let uppercase = Char.uppercase +[@@@ocaml.warning "+3"] + +let norm_char_latin1 c = match uppercase c with | '\192'..'\198' -> 'A' | '\199' -> 'C' | '\200'..'\203' -> 'E' @@ -19,12 +23,12 @@ let norm_char_latin1 c = match Char.uppercase c with | '\221' -> 'Y' | c -> c -let norm_char_utf8 c = Char.uppercase c +let norm_char_utf8 c = uppercase c let norm_char c = if !utf8 then norm_char_utf8 c else if !latin1 then norm_char_latin1 c else - Char.uppercase c + uppercase c let norm_string = String.map (fun s -> norm_char s) |