Melange_compiler_libs.Warnings
Warning definitions
Warning: this module is unstable and part of compiler-libs.
let ghost_loc_in_file: string => loc;
Return an empty ghost range located in a given file
type t =
| Comment_start
| Comment_not_end
| Fragile_match(string)
| Ignored_partial_application
| Labels_omitted(list(string))
| Method_override(list(string))
| Partial_match(string)
| Missing_record_field_pattern(string)
| Non_unit_statement
| Redundant_case
| Redundant_subpat
| Instance_variable_override(list(string))
| Illegal_backslash
| Implicit_public_methods(list(string))
| Unerasable_optional_argument
| Undeclared_virtual_method(string)
| Not_principal(string)
| Non_principal_labels(string)
| Ignored_extra_argument
| Nonreturning_statement
| Preprocessor(string)
| Useless_record_with
| Bad_module_name(string)
| All_clauses_guarded
| Unused_var(string)
| Unused_var_strict(string)
| Wildcard_arg_to_constant_constr
| Eol_in_string
| Duplicate_definitions(string, string, string, string)
| Unused_value_declaration(string)
| Unused_open(string)
| Unused_type_declaration(string)
| Unused_for_index(string)
| Unused_ancestor(string)
| Unused_constructor(string, constructor_usage_warning)
| Unused_extension(string, bool, constructor_usage_warning)
| Unused_rec_flag
| Name_out_of_scope(string, list(string), bool)
| Ambiguous_name(list(string), list(string), bool, string)
| Disambiguated_name(string)
| Nonoptional_label(string)
| Open_shadow_identifier(string, string)
| Open_shadow_label_constructor(string, string)
| Bad_env_variable(string, string)
| Attribute_payload(string, string)
| Eliminated_optional_arguments(list(string))
| No_cmi_file(string, option(string))
| Unexpected_docstring(bool)
| Fragile_literal_pattern
| Misplaced_attribute(string)
| Duplicated_attribute(string)
| Inlining_impossible(string)
| Unreachable_case
| Ambiguous_var_in_pattern_guard(list(string))
| Flambda_assignment_to_non_mutable_value
| Unused_module(string)
| Unboxable_type_in_prim_decl(string)
| Constraint_on_gadt
| Erroneous_printed_signature(string)
| Unsafe_array_syntax_without_parsing
| Redefining_unit(string)
| Unused_open_bang(string)
| Unused_functor_parameter(string)
| Match_on_mutable_state_prevent_uncurry
| Unused_field(string, field_usage_warning)
| Missing_mli
| Unused_tmc_attribute
| Tmc_breaks_tailcall
| Generative_application_expects_unit
| Mel_unused_attribute(string)
| Mel_polymorphic_comparison
| Mel_ffi_warning(string)
| Mel_derive_warning(string)
| Mel_fragile_external(string)
| Mel_unimplemented_primitive(string)
| Mel_integer_literal_overflow
| Mel_uninterpreted_delimiters(string)
| Mel_toplevel_expression_unit
;
let parse_options: bool => string => option(alert);
Disable/enable alerts based on the parameter to the -alert command-line option. Raises Arg.Bad
if the string is not a valid specification.
let is_active: t => bool;
let is_error: t => bool;
type reporting_information = Melange_wrapper.Warnings.reporting_information = {
id: string,
message: string,
is_error: bool,
sub_locs: list((loc, string)),
};
let report: t => [ `Active(reporting_information) | `Inactive ];
let report_alert: alert => [ `Active(reporting_information) | `Inactive ];
let backup: unit => state;
let restore: state => unit;
let with_state: state => (unit => 'a) => 'a;
Like Lazy.of_fun
, but the function is applied with the warning/alert settings at the time mk_lazy
is called.
let message: t => string;
let number: t => int;
let descriptions: list(description);