Module Debug

module Debug: sig .. end

Debug flag handling


type flag 
val register_flag : desc:Pp.formatted -> string -> flag

Return the corresponding flag, after registering it if needed.

val register_info_flag : desc:Pp.formatted -> string -> flag

Return the corresponding flag, after registering it if needed. Info flags are set by --debug-all and must not change the behavior.

val list_flags : unit -> (string * flag * bool * Pp.formatted) list

List the known flags. The boolean component indicates an info flag.

val lookup_flag : string -> flag

Return the corresponding flag.

Modify the state of a flag.

val set_flag : flag -> unit
val unset_flag : flag -> unit
val toggle_flag : flag -> unit

Return the state of a flag.

val test_flag : flag -> bool
val test_noflag : flag -> bool
val set_debug_formatter : Stdlib.Format.formatter -> unit

Set the formatter used when printing debug material.

val get_debug_formatter : unit -> Stdlib.Format.formatter

Get the formatter used when printing debug material.

val dprintf : flag -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a

Print only if the flag is set.

val stack_trace : flag

"stack_trace" flag.

module Args: sig .. end

Command line arguments

val stats : flag
type 'a stat 
module Stats: sig .. end