package posix-getopt

  1. Overview
  2. Docs
type short = char
type long = string * char
type arg = [
  1. | `None of unit -> unit
  2. | `Optional of string option -> unit
  3. | `Required of string -> unit
]
type 'a opt = {
  1. name : 'a;
  2. arg : arg;
}
exception Unknown_option of string
exception Missing_argument of char
val has_getopt_long : bool
val has_getopt_long_only : bool
val print_error : bool -> unit
val reset : unit -> unit
val getopt : string array -> short opt list -> string array
val getopt_long : string array -> long opt list -> string array
val getopt_long_only : string array -> long opt list -> string array
OCaml

Innovation. Community. Security.