diff options
Diffstat (limited to 'pretyping/inductiveops.ml')
-rw-r--r-- | pretyping/inductiveops.ml | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml index fe90941d..bdccc57b 100644 --- a/pretyping/inductiveops.ml +++ b/pretyping/inductiveops.ml @@ -1,13 +1,11 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: inductiveops.ml 15019 2012-03-02 17:27:18Z letouzey $ *) - open Util open Names open Univ @@ -78,7 +76,7 @@ let mis_is_recursive_subset listind rarg = List.exists (fun ra -> match dest_recarg ra with - | Mrec i -> List.mem i listind + | Mrec (_,i) -> List.mem i listind | _ -> false) rvec in array_exists one_is_rec (dest_subterms rarg) @@ -145,12 +143,9 @@ let make_case_info env ind style = let print_info = { ind_nargs = mip.mind_nrealargs_ctxt; style = style } in { ci_ind = ind; ci_npar = mib.mind_nparams; - ci_cstr_nargs = mip.mind_consnrealdecls; + ci_cstr_ndecls = mip.mind_consnrealdecls; ci_pp_info = print_info } -let make_default_case_info env style ind = - make_case_info env ind style - (*s Useful functions *) type constructor_summary = { @@ -202,12 +197,6 @@ let get_constructors env (ind,params) = Array.init (Array.length mip.mind_consnames) (fun j -> get_constructor (ind,mib,mip,params) (j+1)) -let rec instantiate args c = match kind_of_term c, args with - | Prod (_,_,c), a::args -> instantiate args (subst1 a c) - | LetIn (_,b,_,c), args -> instantiate args (subst1 b c) - | _, [] -> c - | _ -> anomaly "too short arity" - (* substitution in a signature *) let substnl_rel_context subst n sign = @@ -301,6 +290,7 @@ let find_rectype env sigma c = match kind_of_term t with | Ind ind -> let (mib,mip) = Inductive.lookup_mind_specif env ind in + if mib.mind_nparams > List.length l then raise Not_found; let (par,rargs) = list_chop mib.mind_nparams l in IndType((ind, par),rargs) | _ -> raise Not_found |