Debian Codegraph @

printing/ppextend.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 open Constrexpr
12
13 (** {6 Pretty-print. } *)
14
15 type ppbox =
16 | PpHB
17 | PpHOVB of int
18 | PpHVB of int
19 | PpVB of int
20
21 type ppcut =
22 | PpBrk of int * int
23 | PpFnl
24
25 val ppcmd_of_box : ppbox -> Pp.t -> Pp.t
26
27 val ppcmd_of_cut : ppcut -> Pp.t
28
29 (** {6 Printing rules for notations} *)
30
31 type pattern_quote_style = QuotedPattern | NotQuotedPattern
32
33 (** Declare and look for the printing rule for symbolic notations *)
34 type unparsing =
35 | UnpMetaVar of notation_entry_relative_level
36 | UnpBinderMetaVar of notation_entry_relative_level * pattern_quote_style
37 | UnpListMetaVar of notation_entry_relative_level * unparsing list
38 | UnpBinderListMetaVar of
39 bool (* true if open binder *) *
40 bool (* true if printed with a quote *) *
41 unparsing list
42 | UnpTerminal of string
43 | UnpBox of ppbox * unparsing Loc.located list
44 | UnpCut of ppcut
45
46 type unparsing_rule = unparsing list
47
48 val unparsing_eq : unparsing -> unparsing -> bool
49
50 type notation_printing_rules = {
51 notation_printing_unparsing : unparsing_rule;
52 notation_printing_level : entry_level;
53 }
54
55 type generic_notation_printing_rules = {
56 notation_printing_reserved : bool;
57 notation_printing_rules : notation_printing_rules;
58 }
59
60 val declare_generic_notation_printing_rules : notation -> generic_notation_printing_rules -> unit
61 val declare_specific_notation_printing_rules : specific_notation -> notation_printing_rules -> unit
62 val has_generic_notation_printing_rule : notation -> bool
63 val find_generic_notation_printing_rule : notation -> generic_notation_printing_rules
64 val find_specific_notation_printing_rule : specific_notation -> notation_printing_rules
65 val find_notation_printing_rule : notation_with_optional_scope option -> notation -> notation_printing_rules