sig
  type flag
  val register_flag : desc:Pp.formatted -> string -> Debug.flag
  val register_info_flag : desc:Pp.formatted -> string -> Debug.flag
  val list_flags : unit -> (string * Debug.flag * bool * Pp.formatted) list
  val lookup_flag : string -> Debug.flag
  val set_flag : Debug.flag -> unit
  val unset_flag : Debug.flag -> unit
  val toggle_flag : Debug.flag -> unit
  val test_flag : Debug.flag -> bool
  val test_noflag : Debug.flag -> bool
  val set_debug_formatter : Stdlib.Format.formatter -> unit
  val get_debug_formatter : unit -> Stdlib.Format.formatter
  val dprintf :
    Debug.flag -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
  val stack_trace : Debug.flag
  module Args :
    sig
      type spec = Getopt.opt
      val desc_debug_list : Debug.Args.spec
      val option_list : unit -> bool
      val desc_debug_all : Debug.Args.spec
      val desc_debug : Debug.Args.spec
      val desc_shortcut :
        string -> Getopt.key -> Getopt.doc -> Debug.Args.spec
      val set_flags_selected : ?silent:bool -> unit -> unit
    end
  val stats : Debug.flag
  type 'a stat
  module Stats :
    sig
      val register :
        print:(Stdlib.Format.formatter -> '-> unit) ->
        name:string -> init:'-> 'Debug.stat
      val mod0 : 'Debug.stat -> ('-> 'a) -> unit
      val mod1 : 'Debug.stat -> ('-> '-> 'a) -> '-> unit
      val mod2 : 'Debug.stat -> ('-> '-> '-> 'a) -> '-> '-> unit
      val register_int : name:string -> init:int -> int Debug.stat
      val incr : int Debug.stat -> unit
      val decr : int Debug.stat -> unit
      val record_timing : string -> (unit -> 'a) -> 'a
      val add_timing : string -> float -> unit
      val get_timings : unit -> (string, float * int) Stdlib.Hashtbl.t
    end
end