Debian Codegraph @

plugins/ltac2/tac2entries.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 Names
12 open Libnames
13 open Tac2expr
14
15 (** {5 Toplevel definitions} *)
16
17 val register_ltac : ?deprecation:Deprecation.t -> ?local:bool -> ?mut:bool -> rec_flag ->
18 (Names.lname * raw_tacexpr) list -> unit
19
20 val register_type : ?local:bool -> ?abstract:bool -> rec_flag ->
21 (qualid * redef_flag * raw_quant_typedef) list -> unit
22
23 val import_type : qualid -> Id.t -> unit
24
25 val register_primitive : ?deprecation:Deprecation.t -> ?local:bool ->
26 Names.lident -> raw_typexpr -> ml_tactic_name -> unit
27
28 val register_struct : Attributes.vernac_flags -> strexpr -> unit
29
30 type notation_interpretation_data
31
32 type notation_target = qualid option * int option
33
34 val pr_register_notation : sexpr list -> notation_target -> raw_tacexpr -> Pp.t
35
36 val pr_register_abbreviation : Id.t CAst.t -> raw_tacexpr -> Pp.t
37
38 val register_notation : Attributes.vernac_flags -> sexpr list ->
39 notation_target -> raw_tacexpr -> notation_interpretation_data
40
41 val register_abbreviation : Attributes.vernac_flags -> Id.t CAst.t ->
42 raw_tacexpr -> notation_interpretation_data
43
44 val register_notation_interpretation : notation_interpretation_data -> unit
45
46 val register_custom_entry : lident -> unit
47
48 val perform_eval : pstate:Declare.Proof.t option -> raw_tacexpr -> unit
49
50 (** {5 Notations} *)
51
52 type syntax_class_rule =
53 | SyntaxRule : (raw_tacexpr, _, 'a) Procq.Symbol.t * ('a -> raw_tacexpr) -> syntax_class_rule
54
55 type used_levels
56
57 val no_used_levels : used_levels
58
59 val union_used_levels : used_levels -> used_levels -> used_levels
60
61 type 'glb syntax_class_decl = {
62 intern_synclass : sexpr list -> used_levels * 'glb;
63 interp_synclass : 'glb -> syntax_class_rule;
64 }
65
66 val register_syntax_class : Id.t -> _ syntax_class_decl -> unit
67 (** Create a new syntax class with the provided name *)
68
69 type syntax_class
70
71 val intern_syntax_class : sexpr -> used_levels * syntax_class
72 (** Use this to internalize the syntax class arguments for interpretation functions *)
73
74 val interp_syntax_class : syntax_class -> syntax_class_rule
75 (** Use this to interpret the syntax class arguments for interpretation functions *)
76
77 (** {5 Inspecting} *)
78
79 val print_located_tactic : Libnames.qualid -> unit
80 (** Display the absolute name of a tactic. *)
81
82 val print_ltac2 : Libnames.qualid -> unit
83 (** Display the definition of a tactic. *)
84
85 val print_ltac2_type : Libnames.qualid -> unit
86 (** Display the definition of a type. *)
87
88 val print_signatures : unit -> unit
89 (** Print types of all definitions in scope. *)
90
91 val typecheck_expr : raw_tacexpr -> unit
92
93 val globalize_expr : raw_tacexpr -> unit
94
95 module Tac2Custom : module type of KerName
96
97 module CustomTab : Nametab.NAMETAB with type elt = Tac2Custom.t
98
99 val find_custom_entry : Tac2Custom.t -> raw_tacexpr Procq.Entry.t
100 (** NB: Do not save the result of this function across summary resets,
101 the Entry.t gets regenerated on (parsing) summary unfreeze. *)
102
103 (** {5 Eval loop} *)
104
105 (** Evaluate a tactic expression in the current environment *)
106 val call : pstate:Declare.Proof.t -> Goal_select.t option -> with_end_tac:bool CAst.t -> raw_tacexpr
107 -> Declare.Proof.t
108
109 val call_par : pstate:Declare.Proof.t -> raw_tacexpr -> Declare.Proof.t
110
111 (** {5 Parsing entries} *)
112
113 module Pltac :
114 sig
115 val ltac2_expr : raw_tacexpr Procq.Entry.t
116 val tac2expr_in_env : (Id.t CAst.t list * raw_tacexpr) Procq.Entry.t
117
118 (** Quoted entries. To be used for complex notations. *)
119
120 open Tac2qexpr
121
122 val q_ident : Id.t CAst.t or_anti Procq.Entry.t
123 val q_bindings : bindings Procq.Entry.t
124 val q_with_bindings : bindings Procq.Entry.t
125 val q_intropattern : intro_pattern Procq.Entry.t
126 val q_intropatterns : intro_pattern list CAst.t Procq.Entry.t
127 val q_destruction_arg : destruction_arg Procq.Entry.t
128 val q_induction_clause : induction_clause Procq.Entry.t
129 val q_conversion : conversion Procq.Entry.t
130 val q_orient : orientation Procq.Entry.t
131 val q_rewriting : rewriting Procq.Entry.t
132 val q_clause : clause Procq.Entry.t
133 val q_dispatch : dispatch Procq.Entry.t
134 val q_occurrences : occurrences Procq.Entry.t
135 val q_reference : reference or_anti Procq.Entry.t
136 val q_strategy_flag : strategy_flag Procq.Entry.t
137 val q_constr_matching : constr_matching Procq.Entry.t
138 val q_goal_matching : goal_matching Procq.Entry.t
139 val q_hintdb : hintdb Procq.Entry.t
140 val q_move_location : move_location Procq.Entry.t
141 val q_pose : pose Procq.Entry.t
142 val q_assert : assertion Procq.Entry.t
143 end