1Warnings(3)                      OCaml library                     Warnings(3)
2
3
4

NAME

6       Warnings - Warning definitions
7

Module

9       Module   Warnings
10

Documentation

12       Module Warnings
13        : sig end
14
15
16       Warning definitions
17
18       Warning: this module is unstable and part of Compiler_libs .
19
20
21
22
23
24       type loc = {
25        loc_start : Lexing.position ;
26        loc_end : Lexing.position ;
27        loc_ghost : bool ;
28        }
29
30
31
32
33       type t =
34        | Comment_start
35        | Comment_not_end
36        | Fragile_match of string
37        | Partial_application
38        | Labels_omitted of string list
39        | Method_override of string list
40        | Partial_match of string
41        | Non_closed_record_pattern of string
42        | Statement_type
43        | Unused_match
44        | Unused_pat
45        | Instance_variable_override of string list
46        | Illegal_backslash
47        | Implicit_public_methods of string list
48        | Unerasable_optional_argument
49        | Undeclared_virtual_method of string
50        | Not_principal of string
51        | Without_principality of string
52        | Unused_argument
53        | Nonreturning_statement
54        | Preprocessor of string
55        | Useless_record_with
56        | Bad_module_name of string
57        | All_clauses_guarded
58        | Unused_var of string
59        | Unused_var_strict of string
60        | Wildcard_arg_to_constant_constr
61        | Eol_in_string
62        | Duplicate_definitions of string * string * string * string
63        | Multiple_definition of string * string * string
64        | Unused_value_declaration of string
65        | Unused_open of string
66        | Unused_type_declaration of string
67        | Unused_for_index of string
68        | Unused_ancestor of string
69        | Unused_constructor of string * bool * bool
70        | Unused_extension of string * bool * bool * bool
71        | Unused_rec_flag
72        | Name_out_of_scope of string * string list * bool
73        | Ambiguous_name of string list * string list * bool * string
74        | Disambiguated_name of string
75        | Nonoptional_label of string
76        | Open_shadow_identifier of string * string
77        | Open_shadow_label_constructor of string * string
78        | Bad_env_variable of string * string
79        | Attribute_payload of string * string
80        | Eliminated_optional_arguments of string list
81        | No_cmi_file of string * string option
82        | Bad_docstring of bool
83        | Expect_tailcall
84        | Fragile_literal_pattern
85        | Misplaced_attribute of string
86        | Duplicated_attribute of string
87        | Inlining_impossible of string
88        | Unreachable_case
89        | Ambiguous_pattern of string list
90        | No_cmx_file of string
91        | Assignment_to_non_mutable_value
92        | Unused_module of string
93        | Unboxable_type_in_prim_decl of string
94        | Constraint_on_gadt
95        | Erroneous_printed_signature of string
96        | Unsafe_without_parsing
97        | Redefining_unit of string
98        | Unused_open_bang of string
99        | Unused_functor_parameter of string
100
101
102
103
104       type alert = {
105        kind : string ;
106        message : string ;
107        def : loc ;
108        use : loc ;
109        }
110
111
112
113
114
115       val parse_options : bool -> string -> unit
116
117
118
119
120       val parse_alert_option : string -> unit
121
122       Disable/enable alerts based on the parameter to the -alert command-line
123       option.  Raises Arg.Bad if the string is not a valid specification.
124
125
126
127       val without_warnings : (unit -> 'a) -> 'a
128
129       Run the thunk with all warnings and alerts disabled.
130
131
132
133       val is_active : t -> bool
134
135
136
137
138       val is_error : t -> bool
139
140
141
142
143       val defaults_w : string
144
145
146
147
148       val defaults_warn_error : string
149
150
151
152       type reporting_information = {
153        id : string ;
154        message : string ;
155        is_error : bool ;
156        sub_locs : (loc * string) list ;
157        }
158
159
160
161
162
163       val report : t -> [ `Active of reporting_information | `Inactive ]
164
165
166
167
168       val report_alert : alert -> [ `Active of reporting_information | `Inac‐
169       tive ]
170
171
172
173
174       exception Errors
175
176
177
178
179
180       val check_fatal : unit -> unit
181
182
183
184
185       val reset_fatal : unit -> unit
186
187
188
189
190       val help_warnings : unit -> unit
191
192
193
194       type state
195
196
197
198
199
200       val backup : unit -> state
201
202
203
204
205       val restore : state -> unit
206
207
208
209
210       val mk_lazy : (unit -> 'a) -> 'a Lazy.t
211
212       Like  Lazy.of_fun  , but the function is applied with the warning/alert
213       settings at the time mk_lazy is called.
214
215
216
217
218
219OCamldoc                          2020-02-27                       Warnings(3)
Impressum