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
100
101
102
103       type alert = {
104        kind : string ;
105        message : string ;
106        def : loc ;
107        use : loc ;
108        }
109
110
111
112
113
114       val parse_options : bool -> string -> unit
115
116
117
118
119       val parse_alert_option : string -> unit
120
121       Disable/enable alerts based on the parameter to the -alert command-line
122       option.  Raises Arg.Bad if the string is not a valid specification.
123
124
125
126       val without_warnings : (unit -> 'a) -> 'a
127
128       Run the thunk with all warnings and alerts disabled.
129
130
131
132       val is_active : t -> bool
133
134
135
136
137       val is_error : t -> bool
138
139
140
141
142       val defaults_w : string
143
144
145
146
147       val defaults_warn_error : string
148
149
150
151       type reporting_information = {
152        id : string ;
153        message : string ;
154        is_error : bool ;
155        sub_locs : (loc * string) list ;
156        }
157
158
159
160
161
162       val report : t -> [ `Active of reporting_information | `Inactive ]
163
164
165
166
167       val report_alert : alert -> [ `Active of reporting_information | `Inac‐
168       tive ]
169
170
171
172
173       exception Errors
174
175
176
177
178
179       val check_fatal : unit -> unit
180
181
182
183
184       val reset_fatal : unit -> unit
185
186
187
188
189       val help_warnings : unit -> unit
190
191
192
193       type state
194
195
196
197
198
199       val backup : unit -> state
200
201
202
203
204       val restore : state -> unit
205
206
207
208
209       val mk_lazy : (unit -> 'a) -> 'a Lazy.t
210
211       Like  Lazy.of_fun  , but the function is applied with the warning/alert
212       settings at the time mk_lazy is called.
213
214
215
216
217
218OCamldoc                          2019-07-30                       Warnings(3)
Impressum