Skip to content

Commit 187045e

Browse files
committed
update for ocaml 5.x (fixes #356)
1 parent cab901f commit 187045e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

genfft/util.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
(* various utility functions *)
2323
open List
24-
open Unix
24+
open Unix
2525

2626
(*****************************************
2727
* Integer operations
@@ -50,7 +50,7 @@ let lowest_terms n m =
5050
(1,0)
5151
else
5252
let nn = (abs n) in let mm = m * (n / nn)
53-
in let mpos =
53+
in let mpos =
5454
if (mm > 0) then (mm mod nn)
5555
else (mm + (1 + (abs mm) / nn) * nn) mod nn
5656
and d = gcd nn (abs mm)
@@ -84,7 +84,7 @@ let rec pow_mod x n p =
8484
else x * (pow_mod x (n - 1) p) mod p
8585

8686
(******************************************
87-
* auxiliary functions
87+
* auxiliary functions
8888
******************************************)
8989
let rec forall id combiner a b f =
9090
if (a >= b) then id
@@ -93,11 +93,11 @@ let rec forall id combiner a b f =
9393
let sum_list l = fold_right (+) l 0
9494
let max_list l = fold_right (max) l (-999999)
9595
let min_list l = fold_right (min) l 999999
96-
let count pred = fold_left
96+
let count pred = fold_left
9797
(fun a elem -> if (pred elem) then 1 + a else a) 0
9898
let remove elem = List.filter (fun e -> (e != elem))
9999
let cons a b = a :: b
100-
let null = function
100+
let null = function
101101
[] -> true
102102
| _ -> false
103103
let for_list l f = List.iter f l
@@ -134,12 +134,12 @@ let rec suchthat a pred =
134134
(* print an information message *)
135135
let info string =
136136
if !Magic.verbose then begin
137-
let now = Unix.times ()
137+
let now = Unix.times ()
138138
and pid = Unix.getpid () in
139139
prerr_string ((string_of_int pid) ^ ": " ^
140140
"at t = " ^ (string_of_float now.tms_utime) ^ " : ");
141141
prerr_string (string ^ "\n");
142-
flush Pervasives.stderr;
142+
flush Stdlib.stderr;
143143
end
144144

145145
(* iota n produces the list [0; 1; ...; n - 1] *)

0 commit comments

Comments
 (0)