aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-08-01 15:16:42 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-08-01 15:16:42 +0200
commit7e67bba64e1b59be2acf5997157bff10581d28f2 (patch)
treee3d783954f683ea25b10bebb4e19a1188f75db08 /pretyping
parent128a297614d1e0fb32e2bbd465d181c5d5b1562c (diff)
Continuing (incomplete) cleaning of Inductiveops.
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/inductiveops.ml10
-rw-r--r--pretyping/inductiveops.mli4
2 files changed, 14 insertions, 0 deletions
diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml
index ed243bebe..dee22cb17 100644
--- a/pretyping/inductiveops.ml
+++ b/pretyping/inductiveops.ml
@@ -176,6 +176,16 @@ let constructor_nrealdecls_env env (ind,j) = (* TOCHANGE en decls *)
let (_,mip) = Inductive.lookup_mind_specif env ind in
mip.mind_consnrealdecls.(j-1)
+(* Length of arity, excluding params, excluding local defs *)
+
+let inductive_nrealargs ind =
+ let (_,mip) = Global.lookup_inductive ind in
+ mip.mind_nrealargs
+
+let inductive_nrealargs_env env ind =
+ let (_,mip) = Inductive.lookup_mind_specif env ind in
+ mip.mind_nrealargs
+
(* Length of arity, excluding params, including local defs *)
let inductive_nrealdecls ind =
diff --git a/pretyping/inductiveops.mli b/pretyping/inductiveops.mli
index 10ff968cf..cefd5bd9d 100644
--- a/pretyping/inductiveops.mli
+++ b/pretyping/inductiveops.mli
@@ -66,6 +66,10 @@ val constructors_nrealargs_env : env -> inductive -> int array
val constructors_nrealdecls : inductive -> int array
val constructors_nrealdecls_env : env -> inductive -> int array
+(** @return the arity, excluding params, excluding local defs *)
+val inductive_nrealargs : inductive -> int
+val inductive_nrealargs_env : env -> inductive -> int
+
(** @return the arity, excluding params, including local defs *)
val inductive_nrealdecls : inductive -> int
val inductive_nrealdecls_env : env -> inductive -> int