Skip to content
Snippets Groups Projects
Commit 1681b494 authored by Ralf Jung's avatar Ralf Jung
Browse files

explicitly declare visibility of Scope actions

parent d15f70a8
No related branches found
No related tags found
No related merge requests found
......@@ -13,9 +13,10 @@ NORMALIZER:=test-normalizer.sed
test: $(TESTFILES:.v=.vo)
# Make sure everything imports the options, and all Instance/Argument/Hint are qualified.
$(SHOW)"Performing some style checks..."
$(HIDE)for FILE in $(VFILES); do \
if ! fgrep -q 'From stdpp Require Import options.' "$$FILE"; then echo "ERROR: $$FILE does not import 'options'."; echo; exit 1; fi ; \
if egrep '^\s*(Instance|Arguments|Remove|Hint (Extern|Constructors|Resolve|Immediate|Mode|Opaque|Transparent|Unfold))\s' "$$FILE"; then echo "ERROR: $$FILE contains unqualified 'Instance'/'Arguments'/'Hint'."; echo "Please add 'Global' or 'Local' as appropriate."; echo; exit 1; fi \
if egrep '^\s*(Instance|Arguments|Remove|Hint\s+(Extern|Constructors|Resolve|Immediate|Mode|Opaque|Transparent|Unfold)|(Open|Close)\s+Scope)\s' "$$FILE"; then echo "ERROR: $$FILE contains unqualified 'Instance'/'Arguments'/'Hint'/'Scope' (see above)."; echo "Please add 'Global' or 'Local' as appropriate."; echo; exit 1; fi \
done
.PHONY: test
......
......@@ -3,7 +3,7 @@ From stdpp Require Import options.
Declare Scope stream_scope.
Delimit Scope stream_scope with stream.
Open Scope stream_scope.
Global Open Scope stream_scope.
CoInductive stream (A : Type) : Type := scons : A stream A stream A.
Global Arguments scons {_} _ _ : assert.
......
......@@ -9,10 +9,10 @@ imported hereditarily somewhere. *)
Notation length := List.length.
(** * Fix scopes *)
Open Scope string_scope.
Global Open Scope string_scope.
(* Make sure [list_scope] has priority over [string_scope], so that
the "++" notation designates list concatenation. *)
Open Scope list_scope.
Global Open Scope list_scope.
Infix "+:+" := String.append (at level 60, right associativity) : stdpp_scope.
Global Arguments String.append : simpl never.
......
......@@ -5,7 +5,7 @@ naming conventions in this development. *)
From stdpp Require Import countable.
From stdpp Require Export fin list.
From stdpp Require Import options.
Open Scope vector_scope.
Global Open Scope vector_scope.
(** The type [vec n] represents lists of consisting of exactly [n] elements.
Whereas the standard library declares exactly the same notations for vectors as
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment