aboutsummaryrefslogtreecommitdiff
path: root/kernel/typeops.ml
diff options
context:
space:
mode:
authorfilliatr1999-12-07 14:56:36 +0000
committerfilliatr1999-12-07 14:56:36 +0000
commitf2da732ffd5db2b93a2c8120c668f8b2f6068d3b (patch)
tree6cf46158c757cb654c241728eed3ea03bd04d0d0 /kernel/typeops.ml
parent59263ca55924e2f43097ae2296f541b153981bf8 (diff)
debuggage inductifs (suite) / compilation Dhyp et Auto (mais pas linkes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@220 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/typeops.ml')
-rw-r--r--kernel/typeops.ml16
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/typeops.ml b/kernel/typeops.ml
index 255e8d7aa5..46dd750781 100644
--- a/kernel/typeops.ml
+++ b/kernel/typeops.ml
@@ -954,3 +954,19 @@ let control_only_guard env sigma =
| DLAMV(_,v) -> Array.iter control_rec v
in
control_rec
+
+(* [keep_hyps sign ids] keeps the part of the signature [sign] which
+ contains the variables of the set [ids], and recursively the variables
+ contained in the types of the needed variables. *)
+
+let keep_hyps sign needed =
+ rev_sign
+ (fst (it_sign
+ (fun ((hyps,globs) as sofar) id a ->
+ if Idset.mem id globs then
+ (add_sign (id,a) hyps,
+ Idset.union (global_vars_set a.body) globs)
+ else
+ sofar)
+ (nil_sign,needed) sign))
+