From b30a6b141fed01a62330051bfb92c19564c93215 Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Sun, 28 May 2017 13:34:42 +0200 Subject: 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] --- ide/preferences.ml | 6 +++++- ide/xml_lexer.mll | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'ide') 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 } -- cgit v1.2.3