From 1826cf003fe564d751e8376cad69be6b59714596 Mon Sep 17 00:00:00 2001 From: Pierre Letouzey Date: Fri, 3 Jun 2016 11:11:26 +0200 Subject: coq_makefile: List.iteri is now standard since OCaml 4.00 --- tools/coq_makefile.ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml index 4a94c38a47..daa4806779 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) -- cgit v1.2.3