Debian Codegraph @

plugins/ltac2/tac2qexpr.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 Tac2expr
13
14 (** Quoted variants of Ltac syntactic categories. Contrarily to the former, they
15 sometimes allow anti-quotations. Used for notation syntax classes. *)
16
17 type 'a or_anti =
18 | QExpr of 'a
19 | QAnti of Id.t CAst.t
20
21 type reference_r =
22 | QReference of Libnames.qualid
23 | QHypothesis of Id.t
24
25 type reference = reference_r CAst.t
26
27 type quantified_hypothesis =
28 | QAnonHyp of int CAst.t
29 | QNamedHyp of Id.t CAst.t
30
31 type bindings_r =
32 | QImplicitBindings of Constrexpr.constr_expr list
33 | QExplicitBindings of (quantified_hypothesis CAst.t or_anti * Constrexpr.constr_expr) CAst.t list
34 | QNoBindings
35
36 type bindings = bindings_r CAst.t
37
38 type intro_pattern_r =
39 | QIntroForthcoming of bool
40 | QIntroNaming of intro_pattern_naming
41 | QIntroAction of intro_pattern_action
42 and intro_pattern_naming_r =
43 | QIntroIdentifier of Id.t CAst.t or_anti
44 | QIntroFresh of Id.t CAst.t or_anti
45 | QIntroAnonymous
46 and intro_pattern_action_r =
47 | QIntroWildcard
48 | QIntroOrAndPattern of or_and_intro_pattern
49 | QIntroInjection of intro_pattern list CAst.t
50 | QIntroApplyOn of Constrexpr.constr_expr * intro_pattern
51 | QIntroRewrite of bool
52 and or_and_intro_pattern_r =
53 | QIntroOrPattern of intro_pattern list CAst.t list
54 | QIntroAndPattern of intro_pattern list CAst.t
55
56 and intro_pattern = intro_pattern_r CAst.t
57 and intro_pattern_naming = intro_pattern_naming_r CAst.t
58 and intro_pattern_action = intro_pattern_action_r CAst.t
59 and or_and_intro_pattern = or_and_intro_pattern_r CAst.t
60
61 type occurrences_r =
62 | QAllOccurrences
63 | QAllOccurrencesBut of int CAst.t or_anti list
64 | QNoOccurrences
65 | QOnlyOccurrences of int CAst.t or_anti list
66
67 type occurrences = occurrences_r CAst.t
68
69 type hyp_location = (occurrences * Id.t CAst.t or_anti) * Locus.hyp_location_flag
70
71 type clause_r =
72 { q_onhyps : hyp_location list option; q_concl_occs : occurrences; }
73
74 type clause = clause_r CAst.t
75
76 type constr_with_bindings = (Constrexpr.constr_expr * bindings) CAst.t
77
78 type destruction_arg_r =
79 | QElimOnConstr of constr_with_bindings
80 | QElimOnIdent of Id.t CAst.t
81 | QElimOnAnonHyp of int CAst.t
82
83 type destruction_arg = destruction_arg_r CAst.t
84
85 type induction_clause_r = {
86 indcl_arg : destruction_arg;
87 indcl_eqn : intro_pattern_naming option;
88 indcl_as : or_and_intro_pattern option;
89 indcl_in : clause option;
90 }
91
92 type induction_clause = induction_clause_r CAst.t
93
94 type conversion_r =
95 | QConvert of Constrexpr.constr_expr
96 | QConvertWith of Constrexpr.constr_expr * Constrexpr.constr_expr
97
98 type conversion = conversion_r CAst.t
99
100 type multi_r =
101 | QPrecisely of int CAst.t
102 | QUpTo of int CAst.t
103 | QRepeatStar
104 | QRepeatPlus
105
106 type multi = multi_r CAst.t
107
108 type orientation = bool option CAst.t
109
110 type rewriting_r = {
111 rew_orient : orientation;
112 rew_repeat : multi;
113 rew_equatn : constr_with_bindings;
114 }
115
116 type rewriting = rewriting_r CAst.t
117
118 type dispatch_r = raw_tacexpr option list * (raw_tacexpr option * raw_tacexpr option list) option
119
120 type dispatch = dispatch_r CAst.t
121
122 type red_flag_r =
123 | QBeta
124 | QIota
125 | QMatch
126 | QFix
127 | QCofix
128 | QZeta
129 | QConst of reference or_anti list CAst.t
130 | QDeltaBut of reference or_anti list CAst.t
131 | QHead
132
133 type red_flag = red_flag_r CAst.t
134
135 type strategy_flag = red_flag list CAst.t
136
137 type constr_match_pattern_r =
138 | QConstrMatchPattern of Constrexpr.constr_expr
139 | QConstrMatchContext of Id.t option * Constrexpr.constr_expr
140
141 type constr_match_pattern = constr_match_pattern_r CAst.t
142
143 type constr_match_branch = (constr_match_pattern * raw_tacexpr) CAst.t
144
145 type constr_matching = constr_match_branch list CAst.t
146
147 type goal_match_pattern_r = {
148 q_goal_match_concl : constr_match_pattern;
149 q_goal_match_hyps : (Names.lname * constr_match_pattern option * constr_match_pattern) list;
150 }
151
152 type goal_match_pattern = goal_match_pattern_r CAst.t
153
154 type goal_match_branch = (goal_match_pattern * raw_tacexpr) CAst.t
155
156 type goal_matching = goal_match_branch list CAst.t
157
158 type hintdb_r =
159 | QHintAll
160 | QHintDbs of Id.t CAst.t or_anti list
161
162 type hintdb = hintdb_r CAst.t
163
164 type move_location_r =
165 | QMoveAfter of Id.t CAst.t or_anti
166 | QMoveBefore of Id.t CAst.t or_anti
167 | QMoveFirst
168 | QMoveLast
169
170 type move_location = move_location_r CAst.t
171
172 type pose = (Id.t CAst.t or_anti option * Constrexpr.constr_expr) CAst.t
173
174 type assertion_r =
175 | QAssertType of intro_pattern option * Constrexpr.constr_expr * raw_tacexpr option
176 | QAssertValue of Id.t CAst.t or_anti * Constrexpr.constr_expr
177
178 type assertion = assertion_r CAst.t