module Reporting:reporting errors and warningssig..end
type warn_source =
| |
Warn_source_exp of |
| |
Warn_source_def of |
| |
Warn_source_unkown |
warm_source allows
to pass the origin easily to warningsval warn_source_to_locn : warn_source -> Ast.ltype warning =
| |
Warn_general of |
(* | Warn_general vl ls m is a general warning with message m, locations ls and a flag vl whether to print these locations verbosely. | *) |
| |
Warn_rename of |
(* | Warning about renaming an identifier. The arguments are the old name, an optional intermediate one, the new name and the target | *) |
| |
Warn_pattern_compilation_failed of |
(* | pattern compilation failed | *) |
| |
Warn_pattern_not_exhaustive of |
(* | pattern match is not exhaustive | *) |
| |
Warn_def_not_exhaustive of |
(* | a function is defined using non-exhaustive pattern-matching | *) |
| |
Warn_pattern_redundant of |
(* | redundant patterns in pattern-match | *) |
| |
Warn_def_redundant of |
(* | redundant patterns in function definition | *) |
| |
Warn_pattern_needs_compilation of |
(* | Warn_pattern_needs_compilation l topt old_e new_e warns about the compilation of old_e to new_e for target topt | *) |
| |
Warn_unused_vars of |
(* | unused variables detected | *) |
| |
Warn_fun_clauses_resorted of |
(* | clauses of mutually recursive function definitions resorted | *) |
| |
Warn_record_resorted of |
(* | record fields resorted | *) |
| |
Warn_no_decidable_equality of |
(* | no decidable equality | *) |
| |
Warn_compile_message of |
(* | Warn_compile_message (l, target, c, m) warns using constant c form target target. | *) |
| |
Warn_import of |
(* | Warn_import (l, module_name, file_name) warns about auto-importing module module_name from file_name. | *) |
| |
Warn_overriden_instance of |
(* | Warn_overriden_instance (l, ty, i) warns that the instance i that has already been defined is
overriden for type ty at location l. | *) |
| |
Warn_ambiguous_code of |
(* | warn about ambiguous code that could be parsed in several ways and that therefore might confuse users | *) |
val warnings_active : bool Pervasives.refwarnings_active is set, warning messages are printed, otherwise
they are thrown away.val report_warning : Typed_ast.env -> warning -> unitreport_warning env w reports a warning. Depending on the settings for the warning type this might mean,
do nothing, print a warning message or print an error message and exit Lemval report_warning_no_env : warning -> unitreport_warning_no_env w reports a warning, when no-environment is available.
In contrast to report_warning the warning messages might be more basic, since
no information can be extracted from the environment.val warn_opts : (string * Arg.spec * string) listval ignore_pat_compile_warnings : unit -> unitval print_debug_exp : Typed_ast.env -> string -> Typed_ast.exp list -> unitval print_debug_def : Typed_ast.env -> string -> Typed_ast.def list -> unitval print_debug_pat : Typed_ast.env -> string -> Typed_ast.pat list -> unitval print_debug_typ : Typed_ast.env -> string -> Types.t list -> unitval print_debug_src_t : Typed_ast.env -> string -> Types.src_t list -> unit