diff options
Diffstat (limited to 'lib/system.ml')
-rw-r--r-- | lib/system.ml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/system.ml b/lib/system.ml index 81dda51f9..37a102d40 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -22,7 +22,7 @@ type load_path = physical_path list let exists_dir dir = try let _ = opendir dir in true with Unix_error _ -> false -let all_subdirs root = +let all_subdirs ~unix_path:root = let l = ref [] in let add f rel = l := (f, rel) :: !l in let rec traverse dir rel = @@ -85,8 +85,8 @@ let find_file_in_path paths name = search_in_path paths name with Not_found -> errorlabstrm "System.find_file_in_path" - (hOV 0 [< 'sTR"Can't find file" ; 'sPC ; 'sTR name ; 'sPC ; - 'sTR"on loadpath" >]) + (hov 0 (str "Can't find file" ++ spc () ++ str name ++ spc () ++ + str "on loadpath")) let is_in_path lpath filename = try @@ -106,8 +106,8 @@ let open_trapping_failure open_fun name suffix = let try_remove f = try Sys.remove f - with _ -> mSGNL [< 'sTR"Warning: " ; 'sTR"Could not remove file " ; - 'sTR f ; 'sTR" which is corrupted!" >] + with _ -> msgnl (str"Warning: " ++ str"Could not remove file " ++ + str f ++ str" which is corrupted!" ) let marshal_out ch v = Marshal.to_channel ch v [] let marshal_in ch = @@ -169,9 +169,9 @@ let get_time () = let time_difference (t1,_,_) (t2,_,_) = t2 -. t1 let fmt_time_difference (startreal,ustart,sstart) (stopreal,ustop,sstop) = - [< 'rEAL(stopreal -. startreal); 'sTR" secs "; - 'sTR"("; - 'rEAL((-.) ustop ustart); 'sTR"u"; - 'sTR","; - 'rEAL((-.) sstop sstart); 'sTR"s"; - 'sTR")" >] + real (stopreal -. startreal) ++ str " secs " ++ + str "(" ++ + real ((-.) ustop ustart) ++ str "u" ++ + str "," ++ + real ((-.) sstop sstart) ++ str "s" ++ + str ")" |