diff options
author | 2003-11-18 10:50:06 +0000 | |
---|---|---|
committer | 2003-11-18 10:50:06 +0000 | |
commit | 5df57be93e8a21141ba0fb4aa00eb1076bf8f6f0 (patch) | |
tree | 90a4e62f4af56ff9cfd80a0fcf9b4ee691800bee | |
parent | 51ca3f46d2afd7f5e261e5147119526f2950a53b (diff) |
Ajout recarg_length
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4935 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | kernel/declarations.ml | 4 | ||||
-rw-r--r-- | kernel/declarations.mli | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/kernel/declarations.ml b/kernel/declarations.ml index 000305ebe..481171652 100644 --- a/kernel/declarations.ml +++ b/kernel/declarations.ml @@ -76,6 +76,10 @@ let dest_subterms p = let (_,cstrs) = Rtree.dest_node p in Array.map (fun t -> Array.to_list (snd (Rtree.dest_node t))) cstrs +let recarg_length p j = + let (_,cstrs) = Rtree.dest_node p in + Array.length (snd (Rtree.dest_node cstrs.(j-1))) + let subst_wf_paths sub p = Rtree.smartmap (subst_recarg sub) p (* [mind_typename] is the name of the inductive; [mind_arity] is diff --git a/kernel/declarations.mli b/kernel/declarations.mli index 70bd8bb89..452cbc972 100644 --- a/kernel/declarations.mli +++ b/kernel/declarations.mli @@ -51,6 +51,7 @@ val mk_norec : wf_paths val mk_paths : recarg -> wf_paths list array -> wf_paths val dest_recarg : wf_paths -> recarg val dest_subterms : wf_paths -> wf_paths list array +val recarg_length : wf_paths -> int -> int val subst_wf_paths : substitution -> wf_paths -> wf_paths |