aboutsummaryrefslogtreecommitdiff
path: root/vernac/vernacexpr.ml
diff options
context:
space:
mode:
authorHugo Herbelin2020-05-11 17:41:58 +0200
committerThéo Zimmermann2020-05-15 18:05:09 +0200
commit96333c1bf27f33c15e2475c11c7bfefe87d3a6e1 (patch)
tree2d1545c2d416846b3e0c52b8537a437582a805c6 /vernac/vernacexpr.ml
parenta28c4b025439a747354c2432223a3b30912ba182 (diff)
Search: new clauses for searching head, conclusion, kind...
- new clauses "hyp:", "concl:", "headhyp:" and "headconcl:" to restrict match to an hypothesis or the conclusion, possibly only at the head (like SearchHead in this latter case) - new clause "is:" to search by kind of object (for some list of kinds) - support for any combination of negations, disjunctions and conjunctions, using a syntax close to that of intropatterns.
Diffstat (limited to 'vernac/vernacexpr.ml')
-rw-r--r--vernac/vernacexpr.ml13
1 files changed, 10 insertions, 3 deletions
diff --git a/vernac/vernacexpr.ml b/vernac/vernacexpr.ml
index c3ae1993cd..0fdf9e2a7b 100644
--- a/vernac/vernacexpr.ml
+++ b/vernac/vernacexpr.ml
@@ -61,15 +61,22 @@ type printable =
| PrintStrategy of qualid or_by_notation option
| PrintRegistered
+type glob_search_where = InHyp | InConcl | Anywhere
+
type search_item =
- | SearchSubPattern of constr_pattern_expr
- | SearchString of string * scope_name option
+ | SearchSubPattern of (glob_search_where * bool) * constr_pattern_expr
+ | SearchString of (glob_search_where * bool) * string * scope_name option
+ | SearchKind of Decls.logical_kind
+
+type search_request =
+ | SearchLiteral of search_item
+ | SearchDisjConj of (bool * search_request) list list
type searchable =
| SearchPattern of constr_pattern_expr
| SearchRewrite of constr_pattern_expr
| SearchHead of constr_pattern_expr
- | Search of (bool * search_item) list
+ | Search of (bool * search_request) list
type locatable =
| LocateAny of qualid or_by_notation