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 /tools/coqdep_lexer.mll | |
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/coqdep_lexer.mll')
-rw-r--r-- | tools/coqdep_lexer.mll | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/coqdep_lexer.mll b/tools/coqdep_lexer.mll index eb233b8f9..c68c34bbb 100644 --- a/tools/coqdep_lexer.mll +++ b/tools/coqdep_lexer.mll @@ -39,6 +39,10 @@ let syntax_error lexbuf = raise (Syntax_error (Lexing.lexeme_start lexbuf, Lexing.lexeme_end lexbuf)) + + [@@@ocaml.warning "-3"] (* String.uncapitalize_ascii since 4.03.0 GPR#124 *) + let uncapitalize = String.uncapitalize + [@@@ocaml.warning "+3"] } let space = [' ' '\t' '\n' '\r'] @@ -154,7 +158,7 @@ and caml_action = parse | space + { caml_action lexbuf } | "open" space* (caml_up_ident as id) - { Use_module (String.uncapitalize id) } + { Use_module (uncapitalize id) } | "module" space+ caml_up_ident { caml_action lexbuf } | caml_low_ident { caml_action lexbuf } @@ -321,12 +325,12 @@ and modules mllist = parse and qual_id ml_module_name = parse | '.' [^ '.' '(' '['] - { Use_module (String.uncapitalize ml_module_name) } + { Use_module (uncapitalize ml_module_name) } | eof { raise Fin_fichier } | _ { caml_action lexbuf } and mllib_list = parse - | caml_up_ident { let s = String.uncapitalize (Lexing.lexeme lexbuf) + | caml_up_ident { let s = uncapitalize (Lexing.lexeme lexbuf) in s :: mllib_list lexbuf } | "*predef*" { mllib_list lexbuf } | space+ { mllib_list lexbuf } |