diff --git a/Makefile.coq.local b/Makefile.coq.local index 00c3e49a688c2b0e7fb9a0f93c8bf4fa5dd164c0..e623454d6ddb3e74c2742f40f0ff232567ffffce 100644 --- a/Makefile.coq.local +++ b/Makefile.coq.local @@ -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 diff --git a/theories/streams.v b/theories/streams.v index 3c2736a2df09337e5c29f5cc6ddf6a48a31b7dc7..32baa73d56f087596a49bbc57b1e1c02c60dfcf6 100644 --- a/theories/streams.v +++ b/theories/streams.v @@ -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. diff --git a/theories/strings.v b/theories/strings.v index f41aa1fbf11d57377610fe87acdf5ad31e91ce43..5cf255a6d3959dd1aeb39cb11c30e8acaf76106b 100644 --- a/theories/strings.v +++ b/theories/strings.v @@ -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. diff --git a/theories/vector.v b/theories/vector.v index 6cff743f2a285fd61bde6c4ff69f7e9c9a43e811..c95ffd1f49167b475d32b47cd57c4716adae8565 100644 --- a/theories/vector.v +++ b/theories/vector.v @@ -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