aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/ssreflect/plugin/v8.4
diff options
context:
space:
mode:
authorFlorent Hivert2016-11-17 01:33:36 +0100
committerFlorent Hivert2016-11-17 01:33:36 +0100
commit84cc11db01159b17a8dcf4d02dbe0549067d228f (patch)
tree964ee247bbf305022235217e716578a37be0bf62 /mathcomp/ssreflect/plugin/v8.4
parent5daf14d44b9cd22c6b51b2b23b4eebe5f3aee79f (diff)
parent23e57fb47874331c5feaace883513b7abecdff28 (diff)
Merge remote-tracking branch 'upstream/master' into fixdoc
Diffstat (limited to 'mathcomp/ssreflect/plugin/v8.4')
-rw-r--r--mathcomp/ssreflect/plugin/v8.4/ssreflect.ml46
-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.ml42
-rw-r--r--mathcomp/ssreflect/plugin/v8.4/ssrmatching.mli2
-rw-r--r--mathcomp/ssreflect/plugin/v8.4/ssrmatching.v27
5 files changed, 32 insertions, 5 deletions
diff --git a/mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4 b/mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4
index 23b4ae5..cc4e896 100644
--- a/mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4
+++ b/mathcomp/ssreflect/plugin/v8.4/ssreflect.ml4
@@ -1,4 +1,4 @@
-(* (c) Copyright 2006-2015 Microsoft Corporation and Inria. *)
+(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *)
(* Distributed under the terms of CeCILL-B. *)
(* This line is read by the Makefile's dist target: do not remove. *)
@@ -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 () ;;
@@ -1447,7 +1447,7 @@ let interp_modloc mr =
(* The unified, extended vernacular "Search" command *)
let ssrdisplaysearch gr env t =
- let pr_res = pr_global gr ++ spc () ++ str " " ++ pr_lconstr_env env t in
+ let pr_res = pr_global gr ++ str ":" ++ spc () ++ pr_lconstr_env env t in
msg (hov 2 pr_res ++ fnl ())
VERNAC COMMAND EXTEND SsrSearchPattern
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.ml4 b/mathcomp/ssreflect/plugin/v8.4/ssrmatching.ml4
index 08f1780..ffbfdfd 100644
--- a/mathcomp/ssreflect/plugin/v8.4/ssrmatching.ml4
+++ b/mathcomp/ssreflect/plugin/v8.4/ssrmatching.ml4
@@ -1,4 +1,4 @@
-(* (c) Copyright 2006-2015 Microsoft Corporation and Inria. *)
+(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *)
(* Distributed under the terms of CeCILL-B. *)
(* Defining grammar rules with "xx" in it automatically declares keywords too,
diff --git a/mathcomp/ssreflect/plugin/v8.4/ssrmatching.mli b/mathcomp/ssreflect/plugin/v8.4/ssrmatching.mli
index a12f53b..5edc0a6 100644
--- a/mathcomp/ssreflect/plugin/v8.4/ssrmatching.mli
+++ b/mathcomp/ssreflect/plugin/v8.4/ssrmatching.mli
@@ -1,4 +1,4 @@
-(* (c) Copyright 2006-2015 Microsoft Corporation and Inria. *)
+(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *)
(* Distributed under the terms of CeCILL-B. *)
open Genarg
diff --git a/mathcomp/ssreflect/plugin/v8.4/ssrmatching.v b/mathcomp/ssreflect/plugin/v8.4/ssrmatching.v
new file mode 100644
index 0000000..369ffaf
--- /dev/null
+++ b/mathcomp/ssreflect/plugin/v8.4/ssrmatching.v
@@ -0,0 +1,27 @@
+(* (c) Copyright 2006-2016 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.