aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Lists
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 /theories/Lists
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
Diffstat (limited to 'theories/Lists')
-rw-r--r--theories/Lists/List.v13
1 files changed, 10 insertions, 3 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 *)