Debian Codegraph @

lib/userWarn.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 (** This is about warnings triggered from user .v code ("warn" attibute).
12 See cWarnings.mli for the generic warning interface. *)
13
14 type warn = private { note : string; cats : string }
15 (** note and comma separated list of categories *)
16
17 type t = { depr : Deprecation.t option; warn : warn list }
18 type 'a with_qf = { depr_qf : 'a Deprecation.with_qf option; warn_qf : warn list }
19
20 val drop_qf : 'a with_qf -> t
21 val with_empty_qf : t -> 'a with_qf
22 val map_qf : ('a -> 'b) -> 'a with_qf -> 'b with_qf
23
24 val is_empty : t -> bool
25 val is_empty_qf : _ with_qf -> bool
26 val empty : t
27
28 val make_warn : note:string -> ?cats:string -> unit -> warn
29
30 val create_warning : ?default:CWarnings.status -> warning_name_if_no_cats:string ->
31 unit -> ?loc:Loc.t -> warn -> unit
32
33 val create_depr_and_user_warnings : ?default:CWarnings.status ->
34 object_name:string -> warning_name_base:string ->
35 ('a -> Pp.t) -> unit ->
36 ?loc:Loc.t -> 'a -> t -> unit
37
38 val create_depr_and_user_warnings_qf : ?default:CWarnings.status ->
39 object_name:string -> warning_name_base:string ->
40 pp_qf:('qf -> Pp.t) -> ('a -> Pp.t) -> unit ->
41 ?loc:Loc.t -> 'a -> 'qf with_qf -> unit