diff options
| author | Pierre-Marie Pédrot | 2017-09-03 19:45:23 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2017-09-03 23:43:50 +0200 |
| commit | 65daf8fca747d385b2985e4e5e91894738f6fcf1 (patch) | |
| tree | 622f42103d2c79b1742b093ec972016bd4704221 /theories/Pattern.v | |
| parent | a2302a48a96a6b635f5301f7cc6254acb58211bc (diff) | |
Introducing a macro for constr matching.
Diffstat (limited to 'theories/Pattern.v')
| -rw-r--r-- | theories/Pattern.v | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/theories/Pattern.v b/theories/Pattern.v index c2ba4162e8..ab3135f189 100644 --- a/theories/Pattern.v +++ b/theories/Pattern.v @@ -12,6 +12,11 @@ Ltac2 Type t := pattern. Ltac2 Type context. +Ltac2 Type 'a constr_match := [ +| ConstrMatchPattern (pattern, constr array -> 'a) +| ConstrMatchContext (pattern, constr -> constr array -> 'a) +]. + Ltac2 @ external matches : t -> constr -> (ident * constr) list := "ltac2" "pattern_matches". (** If the term matches the pattern, returns the bound variables. If it doesn't, |
