aboutsummaryrefslogtreecommitdiff
path: root/plugins/firstorder
diff options
context:
space:
mode:
authorppedrot2013-03-23 15:05:26 +0000
committerppedrot2013-03-23 15:05:26 +0000
commit914d19f19cd73d1794c0160bd6e7358c13eba630 (patch)
treec60b68ddac62f60f1bef763ba970805d228180ad /plugins/firstorder
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 'plugins/firstorder')
-rw-r--r--plugins/firstorder/instances.ml2
-rw-r--r--plugins/firstorder/rules.ml2
-rw-r--r--plugins/firstorder/sequent.ml4
-rw-r--r--plugins/firstorder/unify.ml2
4 files changed, 5 insertions, 5 deletions
diff --git a/plugins/firstorder/instances.ml b/plugins/firstorder/instances.ml
index baf1972e6d..12b2304ac0 100644
--- a/plugins/firstorder/instances.ml
+++ b/plugins/firstorder/instances.ml
@@ -112,7 +112,7 @@ let mk_open_instance id gl m t=
match nam with
Name id -> id
| Anonymous -> dummy_bvid in
- let revt=substl (List.tabulate (fun i->mkRel (m-i)) m) t in
+ let revt=substl (List.init m (fun i->mkRel (m-i))) t in
let rec aux n avoid=
if n=0 then [] else
let nid=(fresh_id avoid var_id gl) in
diff --git a/plugins/firstorder/rules.ml b/plugins/firstorder/rules.ml
index c812deaf55..8abf9d7e22 100644
--- a/plugins/firstorder/rules.ml
+++ b/plugins/firstorder/rules.ml
@@ -129,7 +129,7 @@ let ll_ind_tac ind largs backtrack id continue seq gl=
let head=mkApp ((lift p (constr_of_global id)),[|capply|]) in
it_mkLambda_or_LetIn head rc in
let lp=Array.length rcs in
- let newhyps=List.tabulate myterm lp in
+ let newhyps=List.init lp myterm in
tclIFTHENELSE
(tclTHENLIST
[generalize newhyps;
diff --git a/plugins/firstorder/sequent.ml b/plugins/firstorder/sequent.ml
index 238813e39e..4e4a6f19f4 100644
--- a/plugins/firstorder/sequent.ml
+++ b/plugins/firstorder/sequent.ml
@@ -189,8 +189,8 @@ let empty_seq depth=
let expand_constructor_hints =
List.map_append (function
| IndRef ind ->
- List.tabulate (fun i -> ConstructRef (ind,i+1))
- (Inductiveops.nconstructors ind)
+ List.init (Inductiveops.nconstructors ind)
+ (fun i -> ConstructRef (ind,i+1))
| gr ->
[gr])
diff --git a/plugins/firstorder/unify.ml b/plugins/firstorder/unify.ml
index 93f84687ed..75fd0261ac 100644
--- a/plugins/firstorder/unify.ml
+++ b/plugins/firstorder/unify.ml
@@ -124,7 +124,7 @@ let unif_atoms i dom t1 t2=
| Not_found ->Some (Phantom dom)
let renum_metas_from k n t= (* requires n = max (free_rels t) *)
- let l=List.tabulate (fun i->mkMeta (k+i)) n in
+ let l=List.init n (fun i->mkMeta (k+i)) in
substl l t
let more_general (m1,t1) (m2,t2)=