sig
type loc = {
loc_start : Stdlib.Lexing.position;
loc_end : Stdlib.Lexing.position;
loc_ghost : bool;
}
type field_usage_warning = Unused | Not_read | Not_mutated
type constructor_usage_warning =
Unused
| Not_constructed
| Only_exported_private
type t =
Comment_start
| Comment_not_end
| Fragile_match of string
| Ignored_partial_application
| Labels_omitted of string list
| Method_override of string list
| Partial_match of string
| Missing_record_field_pattern of string
| Non_unit_statement
| Redundant_case
| Redundant_subpat
| Instance_variable_override of string list
| Illegal_backslash
| Implicit_public_methods of string list
| Unerasable_optional_argument
| Undeclared_virtual_method of string
| Not_principal of string
| Non_principal_labels of string
| Ignored_extra_argument
| Nonreturning_statement
| Preprocessor of string
| Useless_record_with
| Bad_module_name of string
| All_clauses_guarded
| Unused_var of string
| Unused_var_strict of string
| Wildcard_arg_to_constant_constr
| Eol_in_string
| Duplicate_definitions of string * string * string * string
| Module_linked_twice of string * string * string
| Unused_value_declaration of string
| Unused_open of string
| Unused_type_declaration of string
| Unused_for_index of string
| Unused_ancestor of string
| Unused_constructor of string * Warnings.constructor_usage_warning
| Unused_extension of string * bool * Warnings.constructor_usage_warning
| Unused_rec_flag
| Name_out_of_scope of string * string list * bool
| Ambiguous_name of string list * string list * bool * string
| Disambiguated_name of string
| Nonoptional_label of string
| Open_shadow_identifier of string * string
| Open_shadow_label_constructor of string * string
| Bad_env_variable of string * string
| Attribute_payload of string * string
| Eliminated_optional_arguments of string list
| No_cmi_file of string * string option
| Unexpected_docstring of bool
| Wrong_tailcall_expectation of bool
| Fragile_literal_pattern
| Misplaced_attribute of string
| Duplicated_attribute of string
| Inlining_impossible of string
| Unreachable_case
| Ambiguous_var_in_pattern_guard of string list
| No_cmx_file of string
| Flambda_assignment_to_non_mutable_value
| Unused_module of string
| Unboxable_type_in_prim_decl of string
| Constraint_on_gadt
| Erroneous_printed_signature of string
| Unsafe_array_syntax_without_parsing
| Redefining_unit of string
| Unused_open_bang of string
| Unused_functor_parameter of string
| Match_on_mutable_state_prevent_uncurry
| Unused_field of string * Warnings.field_usage_warning
| Missing_mli
type alert = {
kind : string;
message : string;
def : Warnings.loc;
use : Warnings.loc;
}
val parse_options : bool -> string -> Warnings.alert option
val parse_alert_option : string -> unit
val without_warnings : (unit -> 'a) -> 'a
val is_active : Warnings.t -> bool
val is_error : Warnings.t -> bool
val defaults_w : string
val defaults_warn_error : string
type reporting_information = {
id : string;
message : string;
is_error : bool;
sub_locs : (Warnings.loc * string) list;
}
val report :
Warnings.t -> [ `Active of Warnings.reporting_information | `Inactive ]
val report_alert :
Warnings.alert ->
[ `Active of Warnings.reporting_information | `Inactive ]
exception Errors
val check_fatal : unit -> unit
val reset_fatal : unit -> unit
val help_warnings : unit -> unit
type state
val backup : unit -> Warnings.state
val restore : Warnings.state -> unit
val mk_lazy : (unit -> 'a) -> 'a Stdlib.Lazy.t
end