summaryrefslogtreecommitdiff
path: root/kernel/inductive.ml
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/inductive.ml')
-rw-r--r--kernel/inductive.ml8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml
index 9415941d..4bb8e9d6 100644
--- a/kernel/inductive.ml
+++ b/kernel/inductive.ml
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(* $Id: inductive.ml 10920 2008-05-12 10:19:32Z herbelin $ *)
+(* $Id: inductive.ml 11309 2008-08-06 10:30:35Z herbelin $ *)
open Util
open Names
@@ -218,7 +218,7 @@ let type_of_constructor cstr (mib,mip) =
let specif = mip.mind_user_lc in
let i = index_of_constructor cstr in
let nconstr = Array.length mip.mind_consnames in
- if i > nconstr then error "Not enough constructors in the type";
+ if i > nconstr then error "Not enough constructors in the type.";
constructor_instantiate (fst ind) mib specif.(i-1)
let arities_of_specif kn (mib,mip) =
@@ -228,7 +228,9 @@ let arities_of_specif kn (mib,mip) =
let arities_of_constructors ind specif =
arities_of_specif (fst ind) specif
-
+let type_of_constructors ind (mib,mip) =
+ let specif = mip.mind_user_lc in
+ Array.map (constructor_instantiate (fst ind) mib) specif
(************************************************************************)