aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/ssreflect/ssrmatching.v
diff options
context:
space:
mode:
authorEnrico Tassi2015-03-09 11:07:53 +0100
committerEnrico Tassi2015-03-09 11:24:38 +0100
commitfc84c27eac260dffd8f2fb1cb56d599f1e3486d9 (patch)
treec16205f1637c80833a4c4598993c29fa0fd8c373 /mathcomp/ssreflect/ssrmatching.v
Initial commit
Diffstat (limited to 'mathcomp/ssreflect/ssrmatching.v')
-rw-r--r--mathcomp/ssreflect/ssrmatching.v27
1 files changed, 27 insertions, 0 deletions
diff --git a/mathcomp/ssreflect/ssrmatching.v b/mathcomp/ssreflect/ssrmatching.v
new file mode 100644
index 0000000..a48b121
--- /dev/null
+++ b/mathcomp/ssreflect/ssrmatching.v
@@ -0,0 +1,27 @@
+(* (c) Copyright Microsoft Corporation and Inria. All rights reserved. *)
+Declare ML Module "ssreflect".
+
+Set Implicit Arguments.
+Unset Strict Implicit.
+Unset Printing Implicit Defensive.
+
+Module SsrMatchingSyntax.
+
+(* Reserve the notation for rewrite patterns so that the user is not allowed *)
+(* to declare it at a different level. *)
+Reserved Notation "( a 'in' b )" (at level 0).
+Reserved Notation "( a 'as' b )" (at level 0).
+Reserved Notation "( a 'in' b 'in' c )" (at level 0).
+Reserved Notation "( a 'as' b 'in' c )" (at level 0).
+
+(* Notation to define shortcuts for the "X in t" part of a pattern. *)
+Notation "( X 'in' t )" := (_ : fun X => t) : ssrpatternscope.
+Delimit Scope ssrpatternscope with pattern.
+
+(* Some shortcuts for recurrent "X in t" parts. *)
+Notation RHS := (X in _ = X)%pattern.
+Notation LHS := (X in X = _)%pattern.
+
+End SsrMatchingSyntax.
+
+Export SsrMatchingSyntax.