aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
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 ed243bebe6..dee22cb173 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 10ff968cf8..cefd5bd9da 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