From fa49da538d1d65f34d7b7fd3c32e51ef7ff578a3 Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 10 Jan 2007 14:37:21 +0000 Subject: Suite commit restructuration discharge (application du type de discharge_function des implicites au cas des scopes d'arguments) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9475 85f007b7-540e-0410-9357-904b9bb8a0f7 --- library/impargs.ml | 4 ++-- library/libnames.ml | 2 ++ library/libnames.mli | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'library') diff --git a/library/impargs.ml b/library/impargs.ml index 296e53310..fc247f8c1 100644 --- a/library/impargs.ml +++ b/library/impargs.ml @@ -418,9 +418,9 @@ let declare_mib_implicits kn = let declare_manual_implicits local ref l = let flags = !implicit_args,!strict_implicit_args,!contextual_implicit_args in let l' = compute_manual_implicits flags ref l in - let local = local or (match ref with VarRef _ -> true | _ -> false) in let req = - if local then ImplNoDischarge else ImplInteractive(ref,flags,ImplManual l) + if local or isVarRef ref then ImplNoDischarge + else ImplInteractive(ref,flags,ImplManual l) in add_anonymous_leaf (inImplicits (req,[ref,l'])) diff --git a/library/libnames.ml b/library/libnames.ml index d951b616e..dcdd5ac41 100644 --- a/library/libnames.ml +++ b/library/libnames.ml @@ -21,6 +21,8 @@ type global_reference = | IndRef of inductive | ConstructRef of constructor +let isVarRef = function VarRef _ -> true | _ -> false + let subst_global subst ref = match ref with | VarRef var -> ref, mkVar var | ConstRef kn -> diff --git a/library/libnames.mli b/library/libnames.mli index 2d5d5258f..fe5033d73 100644 --- a/library/libnames.mli +++ b/library/libnames.mli @@ -23,6 +23,8 @@ type global_reference = | IndRef of inductive | ConstructRef of constructor +val isVarRef : global_reference -> bool + val subst_global : substitution -> global_reference -> global_reference * constr (* Turn a global reference into a construction *) -- cgit v1.2.3