diff options
Diffstat (limited to 'mathcomp/ssreflect/plugin/v8.4')
| -rw-r--r-- | mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4 | 2 | ||||
| -rw-r--r-- | mathcomp/ssreflect/plugin/v8.4/ssreflect_plugin.mllib (renamed from mathcomp/ssreflect/plugin/v8.4/ssreflect.mllib) | 0 | ||||
| -rw-r--r-- | mathcomp/ssreflect/plugin/v8.4/ssrmatching.v | 27 |
3 files changed, 28 insertions, 1 deletions
diff --git a/mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4 b/mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4 index 23b4ae5..b5cd80a 100644 --- a/mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4 +++ b/mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4 @@ -10,7 +10,7 @@ let () = Mltop.add_known_plugin (fun () -> Printf.printf "Copyright 2005-2012 Microsoft Corporation and INRIA.\n"; Printf.printf "Distributed under the terms of the CeCILL-B license.\n\n" end) - "ssreflect" + "ssreflect_plugin" ;; (* Defining grammar rules with "xx" in it automatically declares keywords too *) let frozen_lexer = Lexer.freeze () ;; diff --git a/mathcomp/ssreflect/plugin/v8.4/ssreflect.mllib b/mathcomp/ssreflect/plugin/v8.4/ssreflect_plugin.mllib index 006b70f..006b70f 100644 --- a/mathcomp/ssreflect/plugin/v8.4/ssreflect.mllib +++ b/mathcomp/ssreflect/plugin/v8.4/ssreflect_plugin.mllib diff --git a/mathcomp/ssreflect/plugin/v8.4/ssrmatching.v b/mathcomp/ssreflect/plugin/v8.4/ssrmatching.v new file mode 100644 index 0000000..311d494 --- /dev/null +++ b/mathcomp/ssreflect/plugin/v8.4/ssrmatching.v @@ -0,0 +1,27 @@ +(* (c) Copyright 2006-2015 Microsoft Corporation and Inria. *) +(* Distributed under the terms of CeCILL-B. *) + +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. |
