Rename Without_principality => Non_principal_labels
parent
b2606e0f18
commit
e05f119ea1
|
@ -4223,7 +4223,7 @@ and type_argument ?explanation ?recarg env sarg ty_expected' ty_expected =
|
|||
(Warnings.Eliminated_optional_arguments
|
||||
(List.map (fun (l, _) -> Printtyp.string_of_label l) args));
|
||||
if warn then Location.prerr_warning texp.exp_loc
|
||||
(Warnings.Without_principality "eliminated optional argument");
|
||||
(Warnings.Non_principal_labels "eliminated optional argument");
|
||||
(* let-expand to have side effects *)
|
||||
let let_pat, let_var = var_pair "arg" texp.exp_type in
|
||||
re { texp with exp_type = ty_fun; exp_desc =
|
||||
|
@ -4339,7 +4339,7 @@ and type_application env funct sargs =
|
|||
in
|
||||
let eliminate_optional_arg () =
|
||||
may_warn funct.exp_loc
|
||||
(Warnings.Without_principality "eliminated optional argument");
|
||||
(Warnings.Non_principal_labels "eliminated optional argument");
|
||||
eliminated_optional_arguments :=
|
||||
(l,ty,lv) :: !eliminated_optional_arguments;
|
||||
Some (fun () -> option_none env (instance ty) Location.none)
|
||||
|
@ -4384,7 +4384,7 @@ and type_application env funct sargs =
|
|||
(* No argument was given for this parameter, we abstract over
|
||||
it. *)
|
||||
may_warn funct.exp_loc
|
||||
(Warnings.Without_principality "commuted an argument");
|
||||
(Warnings.Non_principal_labels "commuted an argument");
|
||||
omitted_parameters := (l,ty,lv) :: !omitted_parameters;
|
||||
None
|
||||
end
|
||||
|
|
|
@ -43,7 +43,7 @@ type t =
|
|||
| Unerasable_optional_argument (* 16 *)
|
||||
| Undeclared_virtual_method of string (* 17 *)
|
||||
| Not_principal of string (* 18 *)
|
||||
| Without_principality of string (* 19 *)
|
||||
| Non_principal_labels of string (* 19 *)
|
||||
| Unused_argument (* 20 *)
|
||||
| Nonreturning_statement (* 21 *)
|
||||
| Preprocessor of string (* 22 *)
|
||||
|
@ -120,7 +120,7 @@ let number = function
|
|||
| Unerasable_optional_argument -> 16
|
||||
| Undeclared_virtual_method _ -> 17
|
||||
| Not_principal _ -> 18
|
||||
| Without_principality _ -> 19
|
||||
| Non_principal_labels _ -> 19
|
||||
| Unused_argument -> 20
|
||||
| Nonreturning_statement -> 21
|
||||
| Preprocessor _ -> 22
|
||||
|
@ -223,7 +223,7 @@ let descriptions =
|
|||
18, "Non-principal type.",
|
||||
["not-principal"];
|
||||
19, "Type without principality.",
|
||||
["without-principality"];
|
||||
["non-principal-labels"];
|
||||
20, "Unused function argument.",
|
||||
["unused-argument"];
|
||||
21, "Non-returning statement.",
|
||||
|
@ -632,7 +632,7 @@ let message = function
|
|||
| Unerasable_optional_argument -> "this optional argument cannot be erased."
|
||||
| Undeclared_virtual_method m -> "the virtual method "^m^" is not declared."
|
||||
| Not_principal s -> s^" is not principal."
|
||||
| Without_principality s -> s^" without principality."
|
||||
| Non_principal_labels s -> s^" without principality."
|
||||
| Unused_argument -> "this argument will not be used by the function."
|
||||
| Nonreturning_statement ->
|
||||
"this statement never returns (or has an unsound type.)"
|
||||
|
|
|
@ -45,7 +45,7 @@ type t =
|
|||
| Unerasable_optional_argument (* 16 *)
|
||||
| Undeclared_virtual_method of string (* 17 *)
|
||||
| Not_principal of string (* 18 *)
|
||||
| Without_principality of string (* 19 *)
|
||||
| Non_principal_labels of string (* 19 *)
|
||||
| Unused_argument (* 20 *)
|
||||
| Nonreturning_statement (* 21 *)
|
||||
| Preprocessor of string (* 22 *)
|
||||
|
|
Loading…
Reference in New Issue