X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Futils.ml;h=c4722a8dbc1fb80b59be56d978b7461eee01a3b1;hb=54c8ad92025a9c77c2b10644499b3944e1299187;hp=50adfb42ab72d555e799777083b6f51ad9fb6269;hpb=c07380a3a4dca44a29df4cb09265d10442c1d06f;p=goals.git diff --git a/src/utils.ml b/src/utils.ml index 50adfb4..c4722a8 100644 --- a/src/utils.ml +++ b/src/utils.ml @@ -19,11 +19,15 @@ open Printf +external nprocs : unit -> int = "nprocs" + let failwithf fs = ksprintf failwith fs let (//) = Filename.concat let is_directory d = try Sys.is_directory d with Sys_error _ -> false +let unique = let i = ref 0 in fun () -> incr i; !i + (* From OCaml 4.08 sources. We can remove this when we can * depend on min OCaml 4.08. *)