sig
  type key = KShort of char | KLong of string | Key of char * string
  type _ arg =
      AInt : int Getopt.arg
    | AFloat : float Getopt.arg
    | AString : string Getopt.arg
    | ASymbol : string list -> string Getopt.arg
    | APair : char * 'Getopt.arg * 'Getopt.arg -> ('a * 'b) Getopt.arg
    | AList : char * 'Getopt.arg -> 'a list Getopt.arg
  type handler =
      Hnd0 of (unit -> unit)
    | HndOpt : 'Getopt.arg * ('a option -> unit) -> Getopt.handler
    | Hnd1 : 'Getopt.arg * ('-> unit) -> Getopt.handler
  type doc = string
  type opt = Getopt.key * Getopt.handler * Getopt.doc
  exception GetoptFailure of string
  val commands : string list Stdlib.ref
  val parse_one : Getopt.opt list -> string array -> int -> int
  val parse_many : Getopt.opt list -> string array -> int -> int
  val parse_all :
    ?i:int -> Getopt.opt list -> (string -> unit) -> string array -> unit
  val format : ?margin:int -> Getopt.opt list -> string
  val handle_exn : string -> unit
end