Debian Codegraph @

interp/notationextern.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 (** Declaration of uninterpretation functions (i.e. printing rules)
12 for notations *)
13
14 open Names
15 open Constrexpr
16 open Glob_term
17 open Notation_term
18
19 val notation_entry_eq : notation_entry -> notation_entry -> bool
20 (** Equality on [notation_entry]. *)
21
22 val notation_entry_compare : notation_entry -> notation_entry -> int
23
24 val notation_with_optional_scope_eq : notation_with_optional_scope -> notation_with_optional_scope -> bool
25
26 val notation_eq : notation -> notation -> bool
27 (** Equality on [notation]. *)
28
29 val notation_compare : notation -> notation -> int
30
31 val specific_notation_compare : specific_notation -> specific_notation -> int
32
33 val notation_binder_kind_eq : notation_binder_kind -> notation_binder_kind -> bool
34 (** Equality on [notation_binder_kind]. *)
35
36 val interpretation_eq : interpretation -> interpretation -> bool
37 (** Equality on [interpretation]. *)
38
39 val notation_entry_level_eq : notation_entry_level -> notation_entry_level -> bool
40 (** Equality on [notation_entry_level]. *)
41
42 val notation_entry_relative_level_eq : notation_entry_relative_level -> notation_entry_relative_level -> bool
43 (** Equality on [notation_entry_relative_level]. *)
44
45 type level = notation_entry_level * entry_relative_level list
46 (** The "signature" of a rule: its level together with the levels of its subentries *)
47
48 val level_eq : level -> level -> bool
49 (** Equality on [level]. *)
50
51 val entry_relative_level_eq : entry_relative_level -> entry_relative_level -> bool
52 (** Equality on [entry_relative_level]. *)
53
54 (** Binds a notation in a given scope to an interpretation *)
55 type interp_rule =
56 | NotationRule of Constrexpr.specific_notation
57 | AbbrevRule of Globnames.abbreviation
58
59 val remove_uninterpretation : Environ.env -> interp_rule -> interpretation -> unit
60 val declare_uninterpretation : Environ.env -> interp_rule -> interpretation -> unit
61
62 type notation_applicative_status =
63 | AppBoundedNotation of int
64 | AppUnboundedNotation
65 | NotAppNotation
66
67 type notation_rule = {
68 not_rule : interp_rule;
69 not_patt : interpretation;
70 not_status : notation_applicative_status;
71 }
72
73 (** Return the possible notations for a given term *)
74 val uninterp_notations : Environ.env -> 'a glob_constr_g -> notation_rule list
75 val uninterp_cases_pattern_notations : Environ.env -> 'a cases_pattern_g -> notation_rule list
76 val uninterp_ind_pattern_notations : Environ.env -> inductive -> notation_rule list
77
78 (** State protection *)
79 val with_notation_uninterpretation_protection : ('a -> 'b) -> 'a -> 'b
80
81 (** Miscellaneous *)
82 type notation_use =
83 | OnlyPrinting
84 | OnlyParsing
85 | ParsingAndPrinting