Module Logtk__Util
Some helpers
Time facilities
Misc
module Section : sig ... endDebug section
val debugf : ?section:Section.t -> int -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> ('a -> unit) -> unitPrint a debug message, with the given section and verbosity level. The message might be dropped if its level is too high.
val ksprintf_noc : f:(string -> 'a) -> ('b, Format.formatter, unit, 'a) Pervasives.format4 -> 'bSame as
CCFormat.ksprintf, but without colors
val err_spf : ('b, Format.formatter, unit, string) Pervasives.format4 -> 'bVersion of
sprintfthat adds a colored "error" prefix
val warnf : ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'aEmit warning, with formatting
exceptionError of string * stringgeneralist error that do not really belong elsewhere.
Error (where,what)means that errorwhatwas raised fromwhere.
val errorf : where:string -> ('b, Format.formatter, unit, 'a) Pervasives.format4 -> 'bFormatting version of
error
OCaml Stack
requires ocaml >= 4.01
- since
- 0.8
module Exn : sig ... endprofiling facilities
val mk_profiler : string -> profilerEnable/disable profiling
Create a named profiler
val enter_prof : profiler -> unitCreate a named profiler
Enter the profiler
val exit_prof : profiler -> unitEnter the profiler
Exit the profiler
val with_prof : profiler -> ('a -> 'b) -> 'a -> 'bExit the profiler
Runtime statistics
val mk_stat : string -> statval print_global_stats : comment:string -> unit -> unitcomment prefix
val incr_stat : stat -> unitcomment prefix
val add_stat : stat -> int -> unit
Flags as integers
module Flag : sig ... endOthers
val finally : do_:(unit -> unit) -> (unit -> 'a) -> 'afinally ~do_ fcallsf ()and returns its result. If it raises, the same exception is raised; in any case,do_ ()is called afterf ()terminates.
val pp_pair : ?sep:string -> 'a CCFormat.printer -> 'b CCFormat.printer -> ('a * 'b) CCFormat.printerval pp_list : ?sep:string -> 'a CCFormat.printer -> 'a list CCFormat.printerPrint a list without begin/end separators
val pp_seq : ?sep:string -> 'a CCFormat.printer -> 'a Sequence.t CCFormat.printerval pp_list0 : ?sep:string -> 'a CCFormat.printer -> 'a list CCFormat.printerPrint a list with a whitespace in front if it's non empty, or does nothing if the list is empty Default separator is " "
val tstp_needs_escaping : string -> boolIs this name a proper TSTP identifier, or does it need ' ' around it?
val ord_option : 'a CCOrd.t -> 'a option CCOrd.tval take_drop_while : ('a -> bool) -> 'a list -> 'a list * 'a listval map_product : f:('a -> 'b list list) -> 'a list -> 'b list listval seq_map_l : f:('a -> 'b list) -> 'a list -> 'b list Sequence.tval seq_zipi : 'a Sequence.t -> (int * 'a) Sequence.tval invalid_argf : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'aval failwithf : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
module Int_map : CCMap.S with type Int_map.key = intmodule Int_set : CCSet.S with type Int_set.elt = intFile utils
val popen : cmd:string -> input:string -> string or_errorRun the given command
cmdwith the giveninput, wait for it to terminate, and return its stdout.