| 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 |
(* (c) Copyright 2006-2015 Microsoft Corporation and Inria. *) |
| 12 |
|
| 13 |
Declare ML Module "rocq-runtime.plugins.ssrmatching". |
| 14 |
|
| 15 |
Module SsrMatchingSyntax. |
| 16 |
|
| 17 |
(* Reserve the notation for rewrite patterns so that the user is not allowed *) |
| 18 |
(* to declare it at a different level. *) |
| 19 |
Reserved Notation "( a 'in' b )" (at level 0). |
| 20 |
Reserved Notation "( a 'as' b )" (at level 0). |
| 21 |
Reserved Notation "( a 'in' b 'in' c )" (at level 0). |
| 22 |
Reserved Notation "( a 'as' b 'in' c )" (at level 0). |
| 23 |
|
| 24 |
Declare Scope ssrpatternscope. |
| 25 |
Delimit Scope ssrpatternscope with pattern. |
| 26 |
|
| 27 |
(* Abbreviation to define shortcuts for the "X in t" part of a pattern. *) |
| 28 |
Notation "( X 'in' t )" := (_ : fun X => t) (only parsing) : ssrpatternscope. |
| 29 |
|
| 30 |
(* Some shortcuts for recurrent "X in t" parts. *) |
| 31 |
Abbreviation RHS := (X in _ = X)%pattern. |
| 32 |
Abbreviation LHS := (X in X = _)%pattern. |
| 33 |
|
| 34 |
End SsrMatchingSyntax. |
| 35 |
|
| 36 |
Export SsrMatchingSyntax. |
| 37 |
|
| 38 |
Tactic Notation "ssrpattern" ssrpatternarg(p) := ssrpattern p . |