aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-03-05 08:20:05 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-03-05 08:20:05 +0000
commit5c1768a4dcf39ffd7d58ea9448a842376e86ccf9 (patch)
treee9280dfdc42bf332cfe0975aa21e64d9439d59c7 /kernel
parent5feec6f56c84a9552579438bdba5a5d7f56424f7 (diff)
Re-Déplacement extended_rel_list
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1423 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel')
-rw-r--r--kernel/inductive.ml11
-rw-r--r--kernel/inductive.mli5
-rw-r--r--kernel/term.ml11
-rw-r--r--kernel/term.mli5
4 files changed, 16 insertions, 16 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml
index a5920f870..f03b1ba14 100644
--- a/kernel/inductive.ml
+++ b/kernel/inductive.ml
@@ -343,14 +343,3 @@ let build_branch_type env dep p cs =
else
it_mkProd_or_LetIn base cs.cs_args
-(* [Rel (n+m);...;Rel(n+1)] *)
-
-let extended_rel_list n hyps =
- let rec reln l p = function
- | (_,None,_) :: hyps -> reln (mkRel (n+p) :: l) (p+1) hyps
- | (_,Some _,_) :: hyps -> reln l (p+1) hyps
- | [] -> l
- in
- reln [] 1 hyps
-
-let extended_rel_vect n hyps = Array.of_list (extended_rel_list n hyps)
diff --git a/kernel/inductive.mli b/kernel/inductive.mli
index 4980b9196..e1ee0a56f 100644
--- a/kernel/inductive.mli
+++ b/kernel/inductive.mli
@@ -116,11 +116,6 @@ val build_dependent_constructor : constructor_summary -> constr
the constructor argument of a dependent predicate in a cases branch *)
val build_dependent_inductive : inductive_family -> constr
-(*s [extended_rel_vect n hyps] and [extended_rel_list n hyps]
- generalizes [rel_vect] when local definitions may occur in parameters *)
-val extended_rel_vect : int -> rel_context -> constr array
-val extended_rel_list : int -> rel_context -> constr list
-
(* if the arity for some inductive family [indf] associated to [(I
params)] is [(x1:A1)...(xn:An)sort'] then [make_arity env sigma dep
indf k] builds [(x1:A1)...(xn:An)sort] which is the arity of an
diff --git a/kernel/term.ml b/kernel/term.ml
index 533f013e4..c979577c9 100644
--- a/kernel/term.ml
+++ b/kernel/term.ml
@@ -1225,6 +1225,17 @@ let rel_list n m =
in
reln [] 1
+(* Same as [rel_list] but takes a context as argument and skips let-ins *)
+let extended_rel_list n hyps =
+ let rec reln l p = function
+ | (_,None,_) :: hyps -> reln (mkRel (n+p) :: l) (p+1) hyps
+ | (_,Some _,_) :: hyps -> reln l (p+1) hyps
+ | [] -> l
+ in
+ reln [] 1 hyps
+
+let extended_rel_vect n hyps = Array.of_list (extended_rel_list n hyps)
+
(*********************************)
(* Other term destructors *)
(*********************************)
diff --git a/kernel/term.mli b/kernel/term.mli
index 8672f10a4..87a6c06f6 100644
--- a/kernel/term.mli
+++ b/kernel/term.mli
@@ -489,6 +489,11 @@ val substn_vars : int -> identifier list -> constr -> constr
val rel_vect : int -> int -> constr array
val rel_list : int -> int -> constr list
+(*s [extended_rel_vect n hyps] and [extended_rel_list n hyps]
+ generalizes [rel_vect] when local definitions may occur in parameters *)
+val extended_rel_vect : int -> rel_declaration list -> constr array
+val extended_rel_list : int -> rel_declaration list -> constr list
+
(*s Occur check functions. *)
val occur_meta : constr -> bool