aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-04-08 16:26:12 +0000
committerGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-04-08 16:26:12 +0000
commitd068a422173a55eda92996aa46ec1094be614520 (patch)
tree1cbab293ffd4ae27d568987abb2d0fb5bea01d83
parenta290fc7464c8e5de08b62dfe28ff56e719e3e15e (diff)
A module out of Program to have list notations (bug 2463)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13978 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--theories/Lists/List.v13
-rw-r--r--theories/Program/Syntax.v7
2 files changed, 12 insertions, 8 deletions
diff --git a/theories/Lists/List.v b/theories/Lists/List.v
index 4b823d908..84e145271 100644
--- a/theories/Lists/List.v
+++ b/theories/Lists/List.v
@@ -53,9 +53,16 @@ Section Lists.
End Lists.
-(* Keep these notations local to prevent conflicting notations *)
-Local Notation "[ ]" := nil : list_scope.
-Local Notation "[ a ; .. ; b ]" := (a :: .. (b :: []) ..) : list_scope.
+
+(** Standard notations for lists.
+In a special module to avoid conflict. *)
+Module ListNotations.
+Notation " [ ] " := nil : list_scope.
+Notation " [ x ] " := (cons x nil) : list_scope.
+Notation " [ x ; .. ; y ] " := (cons x .. (cons y nil) ..) : list_scope.
+End ListNotations.
+
+Import ListNotations.
(** ** Facts about lists *)
diff --git a/theories/Program/Syntax.v b/theories/Program/Syntax.v
index d66785874..a66e1284b 100644
--- a/theories/Program/Syntax.v
+++ b/theories/Program/Syntax.v
@@ -28,11 +28,8 @@ Implicit Arguments snd [[A] [B]].
Implicit Arguments nil [[A]].
Implicit Arguments cons [[A]].
-(** Standard notations for lists. *)
-
-Notation " [ ] " := nil : list_scope.
-Notation " [ x ] " := (cons x nil) : list_scope.
-Notation " [ x ; .. ; y ] " := (cons x .. (cons y nil) ..) : list_scope.
+Require List.
+Export List.ListNotations.
Require Import Bvector.