From 870075f34dd9fa5792bfbf413afd3b96f17e76a0 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Fri, 8 Aug 2008 13:18:42 +0200 Subject: Imported Upstream version 8.2~beta4+dfsg --- kernel/inductive.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'kernel/inductive.ml') 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 (************************************************************************) -- cgit v1.2.3