aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2016-06-03 11:11:26 +0200
committerGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2016-06-07 16:16:46 +0200
commit1826cf003fe564d751e8376cad69be6b59714596 (patch)
tree6c69e8a972399f4a3b9a695ed13c7202e4fe4f9f /tools
parente9c57a3b6035278b0d4112da8c350a9cdd356259 (diff)
coq_makefile: List.iteri is now standard since OCaml 4.00
Diffstat (limited to 'tools')
-rw-r--r--tools/coq_makefile.ml5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml
index 4a94c38a4..daa480677 100644
--- a/tools/coq_makefile.ml
+++ b/tools/coq_makefile.ml
@@ -27,9 +27,6 @@ let rec print_list sep = function
| x :: l -> print x; print sep; print_list sep l
| [] -> ()
-let list_iter_i f =
- let rec aux i = function [] -> () | a::l -> f i a; aux (i+1) l in aux 1
-
let section s =
let l = String.length s in
let print_com s =
@@ -154,7 +151,7 @@ let classify_files_by_root var files (inc_ml,inc_i,inc_r) =
printf "\n";
end;
(* Files in the scope of a -R option (assuming they are disjoint) *)
- list_iter_i (fun i (pdir,_,abspdir) ->
+ List.iteri (fun i (pdir,_,abspdir) ->
if List.exists (is_prefix abspdir) absdir_of_files then
printf "%s%d=$(patsubst %s/%%,%%,$(filter %s/%%,$(%s)))\n"
var i pdir pdir var)