aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker
diff options
context:
space:
mode:
authorGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-23 15:05:26 +0000
committerGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-23 15:05:26 +0000
commit914d19f19cd73d1794c0160bd6e7358c13eba630 (patch)
treec60b68ddac62f60f1bef763ba970805d228180ad /checker
parent7bc3e1ce35798d089a979f3cb5a4c5ecc232f850 (diff)
Minor code cleaning in CArray / CList.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16351 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'checker')
-rw-r--r--checker/indtypes.ml6
-rw-r--r--checker/inductive.ml4
2 files changed, 5 insertions, 5 deletions
diff --git a/checker/indtypes.ml b/checker/indtypes.ml
index 9a669e403..8f93ff0be 100644
--- a/checker/indtypes.ml
+++ b/checker/indtypes.ml
@@ -355,8 +355,8 @@ let abstract_mind_lc env ntyps npars lc =
lc
else
let make_abs =
- List.tabulate
- (function i -> lambda_implicit_lift npars (Rel (i+1))) ntyps
+ List.init ntyps
+ (function i -> lambda_implicit_lift npars (Rel (i+1)))
in
Array.map (substl make_abs) lc
@@ -514,7 +514,7 @@ let check_positivity env_ar mind params nrecp inds =
let lparams = rel_context_length params in
let check_one i mip =
let ra_env =
- List.tabulate (fun _ -> (Norec,mk_norec)) lparams @ lra_ind in
+ List.init lparams (fun _ -> (Norec,mk_norec)) @ lra_ind in
let ienv = (env_ar, 1+lparams, ntypes, ra_env) in
check_positivity_one ienv params nrecp (mind,i) mip.mind_nf_lc
in
diff --git a/checker/inductive.ml b/checker/inductive.ml
index abc162af7..5fdca0fab 100644
--- a/checker/inductive.ml
+++ b/checker/inductive.ml
@@ -58,7 +58,7 @@ let inductive_params (mib,_) = mib.mind_nparams
let ind_subst mind mib =
let ntypes = mib.mind_ntypes in
let make_Ik k = Ind (mind,ntypes-k-1) in
- List.tabulate make_Ik ntypes
+ List.init ntypes make_Ik
(* Instantiate inductives in constructor type *)
let constructor_instantiate mind mib c =
@@ -527,7 +527,7 @@ let branches_specif renv c_spec ci =
vra
| Dead_code -> Array.make nca Dead_code
| _ -> Array.make nca Not_subterm) in
- List.tabulate (fun j -> lazy (Lazy.force lvra).(j)) nca)
+ List.init nca (fun j -> lazy (Lazy.force lvra).(j)))
car
(* [subterm_specif renv t] computes the recursive structure of [t] and