sig
  module Log :
    sig
      val output : unit BatIO.output ref
      val prefix : string ref
      type flag = [ `Custom of unit -> string | `Date | `Filepos | `Time ]
      val flags : flag list ref
      val log : ?fp:string -> string -> unit
      val logf : ?fp:string -> ('a, unit BatIO.output, unit) format -> 'a
      val fatal : ?fp:string -> string -> 'a
      val fatalf : ?fp:string -> ('a, unit BatIO.output, unit) format -> 'a
      module type Config =
        sig
          type t
          val out : t BatIO.output
          val prefix : string
          val flags : flag list
        end
      module Make :
        functor (S : Config->
          sig
            val log : ?fp:string -> string -> unit
            val logf :
              ?fp:string -> ('a, S.t BatIO.output, unit) format -> 'a
            val fatal : ?fp:string -> string -> 'a
            val fatalf :
              ?fp:string -> ('a, S.t BatIO.output, unit) format -> 'a
          end
      val make_logger :
        'BatIO.output ->
        string ->
        [< `Custom of unit -> string | `Date | `Filepos | `Time ] list ->
        < fatal : ?fp:string -> string -> 'b;
          fatalf : ?fp:string ->
                   ('c, 'BatIO.output, unit, unit, unit, 'd) format6 -> 'c;
          log : ?fp:string -> string -> unit;
          logf : ?fp:string -> ('e, 'BatIO.output, unit) format -> 'e >
      type easy_lev =
          [ `always | `debug | `error | `fatal | `info | `trace | `warn ]
      module Easy :
        sig
          val level : easy_lev ref
          val output : unit BatIO.output ref
          val log : ?fp:string -> easy_lev -> string -> unit
          val logf :
            ?fp:string ->
            easy_lev -> ('a, unit BatIO.output, unit) format -> 'a
        end
      module type Level_sig =
        sig
          type t
          val to_string : t -> string
          val default_level : t
          val compare : t -> t -> int
        end
      module Make_lev :
        functor (L : Level_sig->
          functor (S : Config->
            sig
              val level : L.t ref
              val output : S.t BatIO.output ref
              val log : ?fp:string -> L.t -> string -> unit
              val logf :
                ?fp:string ->
                L.t -> ('a, S.t BatIO.output, unit) format -> 'a
            end
    end
  module Substring :
    sig
      type t = BatSubstring.t
      val empty : unit -> t
      val to_string : t -> string
      val of_string : string -> t
      val make : int -> char -> t
      val create : int -> t
      val of_input : BatIO.input -> t
      val substring : string -> int -> int -> t
      val extract : string -> int -> int option -> t
      val all : string -> t
      val base : t -> string * int * int
      val is_empty : t -> bool
      val getc : t -> (char * t) option
      val first : t -> char option
      val triml : int -> t -> t
      val trimr : int -> t -> t
      val get : t -> int -> char
      val size : t -> int
      val length : t -> int
      val slice : t -> int -> int option -> t
      val concat : t list -> string
      val explode : t -> char list
      val is_prefix : string -> t -> bool
      val compare : t -> t -> int
      val index : t -> char -> int
      val index_from : t -> int -> char -> int
      val rindex : t -> char -> int
      val rindex_from : t -> int -> char -> int
      val dropl : (char -> bool) -> t -> t
      val dropr : (char -> bool) -> t -> t
      val takel : (char -> bool) -> t -> t
      val taker : (char -> bool) -> t -> t
      val splitl : (char -> bool) -> t -> t * t
      val splitr : (char -> bool) -> t -> t * t
      val split_at : int -> t -> t * t
      val span : t -> t -> t
      val translate : (char -> char) -> t -> string
      val tokens : (char -> bool) -> t -> t list
      val fields : (char -> bool) -> t -> t list
      val fold_left : ('-> char -> 'a) -> '-> t -> 'a
      val fold_right : (char -> '-> 'a) -> t -> '-> 'a
      val iter : (char -> unit) -> t -> unit
      val trim : t -> t
      val split_on_char : char -> t -> t list
      val split_on_pipe : t -> t list
      val split_on_dot : t -> t list
      val split_on_comma : t -> t list
      val split_on_slash : t -> t list
      val print : 'BatIO.output -> t -> unit
    end
  module Bounded :
    sig
      type 'a bound_t = [ `of '| `of '| `u ]
      type ('a, 'b) bounding_f = bounds:'a bound_t * 'a bound_t -> '-> 'b
      val bounding_of_ord :
        default_low:'->
        default_high:'->
        ('-> 'b) -> ('-> '-> BatOrd.order) -> ('a, 'b) bounding_f
      val bounding_of_ord_chain :
        low:('-> 'b) ->
        high:('-> 'b) ->
        ('-> 'b) -> ('-> '-> BatOrd.order) -> ('a, 'b) bounding_f
      val saturate_of_ord :
        bounds:'a bound_t * 'a bound_t ->
        ('-> '-> BatOrd.order) -> '-> 'a
      val opt_of_ord :
        bounds:'a bound_t * 'a bound_t ->
        ('-> '-> BatOrd.order) -> '-> 'a option
      module type BoundedType =
        sig
          type base_t
          type t
          val bounds : base_t bound_t * base_t bound_t
          val bounded : (base_t, t) bounding_f
          val base_of_t : t -> base_t option
          val base_of_t_exn : t -> base_t
        end
      module type BoundedNumericType =
        sig
          type base_t
          type t
          val bounds : base_t bound_t * base_t bound_t
          val bounded : (base_t, t) bounding_f
          val base_of_t : t -> base_t option
          val base_of_t_exn : t -> base_t
          module Infix :
            sig
              val ( + ) : base_t -> base_t -> base_t
              val ( - ) : base_t -> base_t -> base_t
              val ( * ) : base_t -> base_t -> base_t
              val ( / ) : base_t -> base_t -> base_t
              val ( ** ) : base_t -> base_t -> base_t
              val ( -- ) : base_t -> base_t -> base_t BatEnum.t
              val ( --- ) : base_t -> base_t -> base_t BatEnum.t
            end
        end
      module type S =
        sig
          type base_u
          type u
          type t = private u
          val bounds : base_u bound_t * base_u bound_t
          val make : base_u -> t
          external extract : t -> u = "%identity"
          val map : (base_u -> base_u) -> t -> t option
          val map2 : (base_u -> base_u -> base_u) -> t -> t -> t option
          val map_exn : (base_u -> base_u) -> t -> t
          val map2_exn : (base_u -> base_u -> base_u) -> t -> t -> t
        end
      module type NumericSig =
        sig
          type base_u
          type u
          type t = private u
          val bounds : base_u bound_t * base_u bound_t
          val make : base_u -> t
          external extract : t -> u = "%identity"
          val map : (base_u -> base_u) -> t -> t option
          val map2 : (base_u -> base_u -> base_u) -> t -> t -> t option
          val map_exn : (base_u -> base_u) -> t -> t
          val map2_exn : (base_u -> base_u -> base_u) -> t -> t -> t
          val ( + ) : t -> base_u -> t
          val ( - ) : t -> base_u -> t
          val ( * ) : t -> base_u -> t
          val ( / ) : t -> base_u -> t
          val ( +: ) : t -> t -> t
          val ( -: ) : t -> t -> t
          val ( *: ) : t -> t -> t
          val ( /: ) : t -> t -> t
        end
      module Make :
        functor (M : BoundedType->
          sig
            type base_u = M.base_t
            type u = M.t
            type t = BatBounded.Make(M).t
            val bounds : base_u bound_t * base_u bound_t
            val make : base_u -> t
            external extract : t -> u = "%identity"
            val map : (base_u -> base_u) -> t -> t option
            val map2 : (base_u -> base_u -> base_u) -> t -> t -> t option
            val map_exn : (base_u -> base_u) -> t -> t
            val map2_exn : (base_u -> base_u -> base_u) -> t -> t -> t
          end
      module MakeNumeric :
        functor (M : BoundedNumericType->
          sig
            type base_u = M.base_t
            type u = M.t
            type t = BatBounded.MakeNumeric(M).t
            val bounds : base_u bound_t * base_u bound_t
            val make : base_u -> t
            external extract : t -> u = "%identity"
            val map : (base_u -> base_u) -> t -> t option
            val map2 : (base_u -> base_u -> base_u) -> t -> t -> t option
            val map_exn : (base_u -> base_u) -> t -> t
            val map2_exn : (base_u -> base_u -> base_u) -> t -> t -> t
            val ( + ) : t -> base_u -> t
            val ( - ) : t -> base_u -> t
            val ( * ) : t -> base_u -> t
            val ( / ) : t -> base_u -> t
            val ( +: ) : t -> t -> t
            val ( -: ) : t -> t -> t
            val ( *: ) : t -> t -> t
            val ( /: ) : t -> t -> t
          end
    end
  module PathGen :
    sig
      module type StringType =
        sig
          type t
          val length : t -> int
          type tchar
          val get : t -> int -> tchar
          val lift_char : char -> tchar
          val lift : string -> t
          val to_string : t -> string
          val concat_with_separators : t -> t list -> t
          val compare : t -> t -> int
          val iter : (tchar -> unit) -> t -> unit
          val iteri : (int -> tchar -> unit) -> t -> unit
          val sub : t -> int -> int -> t
          val rindex : t -> char -> int
          module Parse :
            sig
              val source :
                t -> (tchar, BatCharParser.position) BatParserCo.Source.t
              val letter :
                (tchar, tchar, BatCharParser.position) BatParserCo.t
            end
        end
      module type PathType =
        sig
          type ustring
          type uchar
          module OperatorLift : sig val ( !! ) : string -> ustring end
          type t = ustring list
          val is_relative : t -> bool
          val is_absolute : t -> bool
          val root : t
          val append : t -> ustring -> t
          val concat : t -> t -> t
          module Operators :
            sig val ( /: ) : t -> ustring -> t val ( //@ ) : t -> t -> t end
          module Infix :
            sig val ( /: ) : t -> ustring -> t val ( //@ ) : t -> t -> t end
          exception Malformed_path
          val normalize_filepath : t -> t
          val normalize_in_graph : t -> t
          val normalize_in_tree : t -> t
          val normalize : t -> t
          val parent : t -> t
          val belongs : t -> t -> bool
          val relative_to_any : t -> t -> t
          exception Not_parent
          val relative_to_parent : t -> t -> t
          exception Illegal_char
          type validator = ustring -> bool
          val default_validator : validator ref
          val to_ustring : t -> ustring
          val to_string : t -> string
          val of_string : ustring -> t
          val s : t -> string
          val p : ustring -> t
          val name : t -> ustring
          val map_name : (ustring -> ustring) -> t -> t
          val ext : t -> ustring option
          val map_ext : (ustring option -> ustring option) -> t -> t
          val name_core : t -> ustring
          type components = t * ustring * ustring option
          val split : t -> components
          val join : components -> t
          val map : (components -> components) -> t -> t
          val drive_letter : t -> uchar option
        end
      module Make :
        functor (S : StringType->
          sig
            type ustring = S.t
            type uchar = S.tchar
            module OperatorLift : sig val ( !! ) : string -> ustring end
            type t = ustring list
            val is_relative : t -> bool
            val is_absolute : t -> bool
            val root : t
            val append : t -> ustring -> t
            val concat : t -> t -> t
            module Operators :
              sig
                val ( /: ) : t -> ustring -> t
                val ( //@ ) : t -> t -> t
              end
            module Infix :
              sig
                val ( /: ) : t -> ustring -> t
                val ( //@ ) : t -> t -> t
              end
            exception Malformed_path
            val normalize_filepath : t -> t
            val normalize_in_graph : t -> t
            val normalize_in_tree : t -> t
            val normalize : t -> t
            val parent : t -> t
            val belongs : t -> t -> bool
            val relative_to_any : t -> t -> t
            exception Not_parent
            val relative_to_parent : t -> t -> t
            exception Illegal_char
            type validator = ustring -> bool
            val default_validator : validator ref
            val to_ustring : t -> ustring
            val to_string : t -> string
            val of_string : ustring -> t
            val s : t -> string
            val p : ustring -> t
            val name : t -> ustring
            val map_name : (ustring -> ustring) -> t -> t
            val ext : t -> ustring option
            val map_ext : (ustring option -> ustring option) -> t -> t
            val name_core : t -> ustring
            type components = t * ustring * ustring option
            val split : t -> components
            val join : components -> t
            val map : (components -> components) -> t -> t
            val drive_letter : t -> uchar option
          end
      module OfString :
        sig
          type ustring = string
          type uchar = char
          module OperatorLift : sig val ( !! ) : string -> ustring end
          type t = ustring list
          val is_relative : t -> bool
          val is_absolute : t -> bool
          val root : t
          val append : t -> ustring -> t
          val concat : t -> t -> t
          module Operators :
            sig val ( /: ) : t -> ustring -> t val ( //@ ) : t -> t -> t end
          module Infix :
            sig val ( /: ) : t -> ustring -> t val ( //@ ) : t -> t -> t end
          exception Malformed_path
          val normalize_filepath : t -> t
          val normalize_in_graph : t -> t
          val normalize_in_tree : t -> t
          val normalize : t -> t
          val parent : t -> t
          val belongs : t -> t -> bool
          val relative_to_any : t -> t -> t
          exception Not_parent
          val relative_to_parent : t -> t -> t
          exception Illegal_char
          type validator = ustring -> bool
          val default_validator : validator ref
          val to_ustring : t -> ustring
          val to_string : t -> string
          val of_string : ustring -> t
          val s : t -> string
          val p : ustring -> t
          val name : t -> ustring
          val map_name : (ustring -> ustring) -> t -> t
          val ext : t -> ustring option
          val map_ext : (ustring option -> ustring option) -> t -> t
          val name_core : t -> ustring
          type components = t * ustring * ustring option
          val split : t -> components
          val join : components -> t
          val map : (components -> components) -> t -> t
          val drive_letter : t -> uchar option
        end
    end
end