diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/inductive.ml | 11 | ||||
| -rw-r--r-- | kernel/inductive.mli | 5 | ||||
| -rw-r--r-- | kernel/term.ml | 11 | ||||
| -rw-r--r-- | kernel/term.mli | 5 |
4 files changed, 16 insertions, 16 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml index a5920f870c..f03b1ba14f 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 4980b9196a..e1ee0a56f0 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 533f013e4d..c979577c9c 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 8672f10a43..87a6c06f6c 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 |
