module Util:sig
..end
val total_time_s : unit -> float
val total_time_ns : unit -> int64
val start_time : unit -> int64
val ns_to_s : int64 -> float
module Section:sig
..end
val set_debug : int -> unit
Section.root
val get_debug : unit -> int
Section.root
val debugf : ?section:Section.t ->
int ->
('a, Format.formatter, unit, unit) Pervasives.format4 -> ('a -> unit) -> unit
val debug : ?section:Section.t -> int -> string -> unit
Util.debugf
val ksprintf_noc : f:(string -> 'a) -> ('b, Format.formatter, unit, 'a) Pervasives.format4 -> 'b
CCFormat.ksprintf
, but without colorsval err_spf : ('b, Format.formatter, unit, string) Pervasives.format4 -> 'b
sprintf
that adds a colored "error" prefixval warn : string -> unit
val warnf : ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
exception Error of string * string
Error (where,what)
means that error what
was raised from where
.val error : where:string -> string -> 'a
error msg
raises Error msg
Error
duhval errorf : where:string -> ('b, Format.formatter, unit, 'a) Pervasives.format4 -> 'b
Util.error
val pp_pos : Lexing.position -> string
val set_memory_limit : int -> unit
val set_time_limit : int -> unit
requires ocaml >= 4.01
module Exn:sig
..end
type
profiler
val enable_profiling : bool Pervasives.ref
val mk_profiler : string -> profiler
val enter_prof : profiler -> unit
val exit_prof : profiler -> unit
val with_prof : profiler -> ('a -> 'b) -> 'a -> 'b
type
stat
val mk_stat : string -> stat
val print_global_stats : unit -> unit
val incr_stat : stat -> unit
val add_stat : stat -> int -> unit
module Flag:sig
..end
val finally : do_:(unit -> unit) -> (unit -> 'a) -> 'a
finally ~do_ f
calls f ()
and returns its result. If it raises, the
same exception is raised; in any case, do_ ()
is called after
f ()
terminates.val pp_pair : ?sep:string ->
'a CCFormat.printer -> 'b CCFormat.printer -> ('a * 'b) CCFormat.printer
val pp_list : ?sep:string -> 'a CCFormat.printer -> 'a list CCFormat.printer
val ord_option : 'a CCOrd.t -> 'a option CCOrd.t
val map_product : f:('a -> 'b list list) -> 'a list -> 'b list list
type'a
or_error =[ `Error of string | `Ok of 'a ]
val popen : cmd:string -> input:string -> string or_error
cmd
with the given input
, wait for it
to terminate, and return its stdout.