Commit 26f3c01c authored by MARCHE Claude's avatar MARCHE Claude Committed by Guillaume Melquiond

Compilation with Ocaml 4.03 : fix warnings

parent 2c78bda7
......@@ -88,12 +88,15 @@ INCLUDES = @ZIPINCLUDE@ @MENHIRINCLUDE@
# 44 Open statement shadows an already defined identifier.
# 45 Open statement shadows an already defined label or constructor.
# 50 Unexpected documentation comment.
# 52 The argument of this constructor should not be matched against a
# constant pattern; the actual value of the argument could change
# in the future.
# - fatal:
# 5 Partially applied function: expression whose result has function
# type and is ignored.
# 48 Implicit elimination of optional arguments.
WARNINGS = A-4-9-41-44-45-50@5@48
WARNINGS = A-4-9-41-44-45-50-52@5@48
OFLAGS = -w $(WARNINGS) -dtypes -g -I lib/why3 $(INCLUDES)
BFLAGS = -w $(WARNINGS) -dtypes -g -I lib/why3 $(INCLUDES)
......
......@@ -30,15 +30,15 @@ let pr_printer =
create_ident_printer bls ~sanitizer:san
let print_symbol fmt id =
let san = String.uncapitalize in
let san = Strings.uncapitalize in
fprintf fmt "%s" (id_unique ~sanitizer:san ident_printer id)
let print_tvar fmt {tv_name = id} =
let san = String.capitalize in
let san = Strings.capitalize in
fprintf fmt "%s" (id_unique ~sanitizer:san ident_printer id)
let print_var fmt {vs_name = id} =
let san = String.capitalize in
let san = Strings.capitalize in
fprintf fmt "%s" (id_unique ~sanitizer:san ident_printer id)
let print_pr fmt pr =
......
......@@ -243,8 +243,8 @@ let char_to_alpha c = match c with
| '6' -> "sx" | '7' -> "st" | '8' -> "oc"
| '9' -> "nn" | '\n' -> "br" | _ -> "zz"
let char_to_lalpha c = String.uncapitalize (char_to_alpha c)
let char_to_ualpha c = String.capitalize (char_to_alpha c)
let char_to_lalpha c = Strings.uncapitalize (char_to_alpha c)
let char_to_ualpha c = Strings.capitalize (char_to_alpha c)
let char_to_alnum c =
match c with '0'..'9' -> String.make 1 c | _ -> char_to_alpha c
......
......@@ -68,7 +68,7 @@ let print_tv fmt tv =
(* logic variables always start with a lower case letter *)
let print_vs fmt vs =
let sanitizer = String.uncapitalize in
let sanitizer = Strings.uncapitalize in
pp_print_string fmt (id_unique iprinter ~sanitizer vs.vs_name)
let forget_var vs = forget_id iprinter vs.vs_name
......@@ -94,7 +94,7 @@ let escape_op s =
(* theory names always start with an upper case letter *)
let print_th fmt th =
let sanitizer = String.capitalize in
let sanitizer = Strings.capitalize in
fprintf fmt "%s" (id_unique iprinter ~sanitizer th.th_name)
let print_ts fmt ts =
......@@ -108,7 +108,7 @@ let print_ls fmt ls =
| None -> fprintf fmt "%s" (id_unique iprinter ls.ls_name)
let print_cs fmt ls =
let sanitizer = String.capitalize in
let sanitizer = Strings.capitalize in
fprintf fmt "%s" (id_unique iprinter ~sanitizer ls.ls_name)
let print_pr fmt pr =
......
......@@ -48,14 +48,14 @@ let print_tv fmt tv =
(* logic variables always start with a lower case letter *)
let print_vs fmt vs =
let sanitizer = String.uncapitalize in
let sanitizer = Strings.uncapitalize in
fprintf fmt "%s" (id_unique iprinter ~sanitizer vs.vs_name)
let forget_var vs = forget_id iprinter vs.vs_name
(* theory names always start with an upper case letter *)
let print_th fmt th =
let sanitizer = String.capitalize in
let sanitizer = Strings.capitalize in
fprintf fmt "%s" (id_unique iprinter ~sanitizer th.th_name)
let print_ts fmt ts =
......@@ -65,7 +65,7 @@ let print_ls fmt ls =
fprintf fmt "%s" (id_unique iprinter ls.ls_name)
let print_cs fmt ls =
let sanitizer = String.capitalize in
let sanitizer = Strings.capitalize in
fprintf fmt "%s" (id_unique iprinter ~sanitizer ls.ls_name)
let print_pr fmt pr =
......
......@@ -14,6 +14,8 @@ let create = String.create
let copy = String.copy
let set = String.set
let capitalize = String.capitalize
let uncapitalize = String.uncapitalize
let rev_split c s =
let rec aux acc i =
......
......@@ -17,6 +17,9 @@ val create : int -> string
val copy : string -> string
val set : string -> int -> char -> unit
val capitalize : string -> string
val uncapitalize : string -> string
(** {2 Other useful functions on strings} *)
val rev_split : char -> string -> string list
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment