aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-10-17 16:46:10 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-10-17 16:46:17 +0200
commit13a2d032004f9678aec84eb5e1ef11c98e43aa9f (patch)
treeeae3ce73512fa9ebd248b0a2b5e60f7052256ce2 /theories
parent502d901fee12f07c31c2ea8b8c1455f74876d986 (diff)
parent1a3fc19d1160cb3896e62a16c8e68c97880c748b (diff)
Merge PR #300 into v8.6
Diffstat (limited to 'theories')
-rw-r--r--theories/Compat/Coq84.v6
-rw-r--r--theories/Lists/List.v1
-rw-r--r--theories/Vectors/VectorDef.v5
3 files changed, 4 insertions, 8 deletions
diff --git a/theories/Compat/Coq84.v b/theories/Compat/Coq84.v
index 5eecdc64c..a3e23f91c 100644
--- a/theories/Compat/Coq84.v
+++ b/theories/Compat/Coq84.v
@@ -74,12 +74,6 @@ Coercion sig_of_sigT : sigT >-> sig.
Coercion sigT2_of_sig2 : sig2 >-> sigT2.
Coercion sig2_of_sigT2 : sigT2 >-> sig2.
-(** As per bug #4733 (https://coq.inria.fr/bugs/show_bug.cgi?id=4733), we want the user to be able to create custom list-like notatoins that work in both 8.4 and 8.5. This is necessary. These should become compat 8.4 notations in the relevant files, but these modify the parser (bug #4798), so this cannot happen until that bug is fixed. *)
-Require Coq.Lists.List.
-Require Coq.Vectors.VectorDef.
-Notation "[ x ; .. ; y ]" := (cons x .. (cons y nil) ..) : list_scope.
-Notation "[ x ; .. ; y ]" := (VectorDef.cons _ x _ .. (VectorDef.cons _ y _ (nil _)) ..) : vector_scope.
-
(** In 8.4, the statement of admitted lemmas did not depend on the section
variables. *)
Unset Keep Admitted Variables.
diff --git a/theories/Lists/List.v b/theories/Lists/List.v
index fc94d7e25..bf21ffb47 100644
--- a/theories/Lists/List.v
+++ b/theories/Lists/List.v
@@ -27,6 +27,7 @@ Module ListNotations.
Notation "[ ]" := nil (format "[ ]") : list_scope.
Notation "[ x ]" := (cons x nil) : list_scope.
Notation "[ x ; y ; .. ; z ]" := (cons x (cons y .. (cons z nil) ..)) : list_scope.
+Notation "[ x ; .. ; y ]" := (cons x .. (cons y nil) ..) (compat "8.4") : list_scope.
End ListNotations.
Import ListNotations.
diff --git a/theories/Vectors/VectorDef.v b/theories/Vectors/VectorDef.v
index f49b34075..1f8b76cb6 100644
--- a/theories/Vectors/VectorDef.v
+++ b/theories/Vectors/VectorDef.v
@@ -295,11 +295,12 @@ End VECTORLIST.
Module VectorNotations.
Delimit Scope vector_scope with vector.
Notation "[ ]" := [] (format "[ ]") : vector_scope.
+Notation "[]" := [] (compat "8.5") : vector_scope.
Notation "h :: t" := (h :: t) (at level 60, right associativity)
: vector_scope.
Notation "[ x ]" := (x :: []) : vector_scope.
-Notation "[ x ; y ; .. ; z ]" := (cons _ x _ (cons _ y _ .. (cons _ z _ (nil _)) ..)) : vector_scope
-.
+Notation "[ x ; y ; .. ; z ]" := (cons _ x _ (cons _ y _ .. (cons _ z _ (nil _)) ..)) : vector_scope.
+Notation "[ x ; .. ; y ]" := (cons _ x _ .. (cons _ y _ (nil _)) ..) (compat "8.4") : vector_scope.
Notation "v [@ p ]" := (nth v p) (at level 1, format "v [@ p ]") : vector_scope.
Open Scope vector_scope.
End VectorNotations.