diff options
-rw-r--r-- | theories/Lists/List.v | 13 | ||||
-rw-r--r-- | theories/Program/Syntax.v | 7 |
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. |