From 3d09e39dd423d81c6af3e991d5b282ea8608646b Mon Sep 17 00:00:00 2001 From: letouzey Date: Wed, 17 Jul 2013 15:31:36 +0000 Subject: More dynamic argument scopes When arguments scopes are set manually, nothing new, they stay as they are (until maybe another Arguments invocation). But when argument scopes are computed out of the argument type and the Bind Scope information, this kind of scope is now dynamic: a later Bind Scope will be able to impact the scopes of an earlier constant. For Instance: Definition f (n:nat) := n. About f. (* Argument scope is [nat_scope] *) Bind Scope other_scope with nat. About f. (* Argument scope is [other_scope] *) This allows to get rid of hacks for modifying scopes during functor applications. Moreover, the subst_arguments_scope is now environment-insensitive (needed for forthcoming changes in declaremods). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16626 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/NArith/BinNat.v | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'theories/NArith') diff --git a/theories/NArith/BinNat.v b/theories/NArith/BinNat.v index 5b1e83e6c..61a77bf0e 100644 --- a/theories/NArith/BinNat.v +++ b/theories/NArith/BinNat.v @@ -893,11 +893,9 @@ Qed. (** Instantiation of generic properties of natural numbers *) -(** The Bind Scope prevents N to stay associated with abstract_scope. - (TODO FIX) *) - -Include NProp. Bind Scope N_scope with N. -Include UsualMinMaxLogicalProperties <+ UsualMinMaxDecProperties. +Include NProp + <+ UsualMinMaxLogicalProperties + <+ UsualMinMaxDecProperties. (** In generic statements, the predicates [lt] and [le] have been favored, whereas [gt] and [ge] don't even exist in the abstract @@ -983,6 +981,8 @@ Qed. End N. +Bind Scope N_scope with N.t N. + (** Exportation of notations *) Infix "+" := N.add : N_scope. -- cgit v1.2.3