diff options
author | Gaëtan Gilbert <gaetan.gilbert@ens-lyon.fr> | 2017-05-28 13:34:42 +0200 |
---|---|---|
committer | Gaëtan Gilbert <gaetan.gilbert@ens-lyon.fr> | 2017-05-28 20:00:47 +0200 |
commit | b30a6b141fed01a62330051bfb92c19564c93215 (patch) | |
tree | ec73a2a0daf06891572f8117dc42978f1b2e7396 /ide | |
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 'ide')
-rw-r--r-- | ide/preferences.ml | 6 | ||||
-rw-r--r-- | ide/xml_lexer.mll | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ide/preferences.ml b/ide/preferences.ml index 9fe9c6337..44a89edf9 100644 --- a/ide/preferences.ml +++ b/ide/preferences.ml @@ -643,6 +643,10 @@ let pmodifiers ?(all = false) name p = modifiers name (str_to_mod_list p#get) +[@@@ocaml.warning "-3"] (* String.uppercase_ascii since 4.03.0 GPR#124 *) +let uppercase = String.uppercase +[@@@ocaml.warning "+3"] + let configure ?(apply=(fun () -> ())) () = let cmd_coqtop = string @@ -969,7 +973,7 @@ let configure ?(apply=(fun () -> ())) () = let k = if Int.equal (CString.length k) 1 && Util.is_letter k.[0] then k else "" in - let k = CString.uppercase k in + let k = uppercase k in [q, k] in diff --git a/ide/xml_lexer.mll b/ide/xml_lexer.mll index 290f2c89a..4a52147e1 100644 --- a/ide/xml_lexer.mll +++ b/ide/xml_lexer.mll @@ -83,6 +83,9 @@ let error lexbuf e = last_pos := lexeme_start lexbuf; raise (Error e) +[@@@ocaml.warning "-3"] (* String.lowercase_ascii since 4.03.0 GPR#124 *) +let lowercase = String.lowercase +[@@@ocaml.warning "+3"] } let newline = ['\n'] @@ -219,7 +222,7 @@ and entity = parse { let ident = lexeme lexbuf in try - Hashtbl.find idents (String.lowercase ident) + Hashtbl.find idents (lowercase ident) with Not_found -> "&" ^ ident } |