Debian Codegraph @

plugins/ltac2/tac2quote.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 Tac2dyn
13 open Tac2qexpr
14 open Tac2expr
15
16 (** Syntactic quoting of expressions. *)
17
18 (** Contrarily to Tac2ffi, which lives on the semantic level, this module
19 manipulates pure syntax of Ltac2. Its main purpose is to write notations. *)
20
21 module Refs : sig
22 (** Standard values *)
23
24 val t_unit : type_constant
25 val v_unit : Tac2val.valexpr
26
27 val t_list : type_constant
28 val c_nil : ltac_constructor
29 val c_cons : ltac_constructor
30
31 val t_option : type_constant
32 val c_none : ltac_constructor
33 val c_some : ltac_constructor
34
35 val t_int : type_constant
36 val t_string : type_constant
37 val t_array : type_constant
38
39 val t_bool : type_constant
40 val c_true : ltac_constructor
41 val c_false : ltac_constructor
42
43 val t_constr : type_constant
44 val t_preterm : type_constant
45 val t_pattern : type_constant
46 val t_ident : type_constant
47 val t_exn : type_constant
48 val t_reference : type_constant
49
50 val t_module : type_constant
51
52 (** Modules *)
53 val control_prefix : ModPath.t
54 end
55
56 val constructor : ?loc:Loc.t -> ltac_constructor -> raw_tacexpr list -> raw_tacexpr
57
58 val thunk : raw_tacexpr -> raw_tacexpr
59
60 val of_anti : ('a -> raw_tacexpr) -> 'a or_anti -> raw_tacexpr
61
62 val of_int : int CAst.t -> raw_tacexpr
63
64 val of_pair : ('a -> raw_tacexpr) -> ('b -> raw_tacexpr) -> ('a * 'b) CAst.t -> raw_tacexpr
65
66 val of_tuple : ?loc:Loc.t -> raw_tacexpr list -> raw_tacexpr
67
68 val of_variable : Id.t CAst.t -> raw_tacexpr
69
70 val of_ident : Id.t CAst.t -> raw_tacexpr
71
72 val of_constr : ?delimiters:Id.t list -> Constrexpr.constr_expr -> raw_tacexpr
73
74 val of_open_constr : ?delimiters:Id.t list -> Constrexpr.constr_expr -> raw_tacexpr
75
76 val of_preterm : ?delimiters:Id.t list -> Constrexpr.constr_expr -> raw_tacexpr
77
78 val of_list : ?loc:Loc.t -> ('a -> raw_tacexpr) -> 'a list -> raw_tacexpr
79
80 val array_literal : ?loc:Loc.t -> raw_tacexpr list -> raw_tacexpr
81
82 val of_bindings : bindings -> raw_tacexpr
83
84 val of_intro_pattern : intro_pattern -> raw_tacexpr
85
86 val of_intro_patterns : intro_pattern list CAst.t -> raw_tacexpr
87
88 val of_clause : clause -> raw_tacexpr
89
90 val of_destruction_arg : destruction_arg -> raw_tacexpr
91
92 val of_induction_clause : induction_clause -> raw_tacexpr
93
94 val of_conversion : conversion -> raw_tacexpr
95
96 val of_orient : orientation -> raw_tacexpr
97
98 val of_rewriting : rewriting -> raw_tacexpr
99
100 val of_occurrences : occurrences -> raw_tacexpr
101
102 val of_hintdb : hintdb -> raw_tacexpr
103
104 val of_move_location : move_location -> raw_tacexpr
105
106 val of_reference : reference or_anti -> raw_tacexpr
107
108 val of_module : Libnames.qualid -> raw_tacexpr
109
110 val of_hyp : ?loc:Loc.t -> Id.t CAst.t -> raw_tacexpr
111 (** id ↦ 'Control.hyp @id' *)
112
113 val of_exact_hyp : ?loc:Loc.t -> Id.t CAst.t -> raw_tacexpr
114 (** id ↦ 'Control.refine (fun () => Control.hyp @id') *)
115
116 val of_exact_var : ?loc:Loc.t -> Id.t CAst.t -> raw_tacexpr
117 (** id ↦ 'Control.refine (fun () => Control.hyp @id') *)
118
119 val of_dispatch : dispatch -> raw_tacexpr
120
121 val of_strategy_flag : strategy_flag -> raw_tacexpr
122
123 val of_pose : pose -> raw_tacexpr
124
125 val of_assertion : assertion -> raw_tacexpr
126
127 val of_constr_matching : constr_matching -> raw_tacexpr
128
129 val of_goal_matching : goal_matching -> raw_tacexpr
130
131 val of_format : lstring -> raw_tacexpr
132
133 (** {5 Generic arguments} *)
134
135 val wit_pattern : (Constrexpr.constr_expr, Pattern.uninstantiated_pattern) Arg.tag
136
137 val wit_ident : (Id.t, Id.t) Arg.tag
138
139 val wit_reference : (reference, GlobRef.t) Arg.tag
140
141 val wit_module : (Libnames.qualid, ModPath.t) Arg.tag
142
143 val wit_constr : (Constrexpr.constr_expr, Glob_term.glob_constr) Arg.tag
144
145 val wit_open_constr : (Constrexpr.constr_expr, Glob_term.glob_constr) Arg.tag
146
147 val wit_preterm : (Constrexpr.constr_expr, Id.Set.t * Glob_term.glob_constr) Arg.tag