package devkit

  1. Overview
  2. Docs
include module type of struct include Stdlib.Arg end
type spec = Stdlib__Arg.spec =
  1. | Unit of unit -> unit
  2. | Bool of bool -> unit
  3. | Set of bool Stdlib.ref
  4. | Clear of bool Stdlib.ref
  5. | String of string -> unit
  6. | Set_string of string Stdlib.ref
  7. | Int of int -> unit
  8. | Set_int of int Stdlib.ref
  9. | Float of float -> unit
  10. | Set_float of float Stdlib.ref
  11. | Tuple of spec list
  12. | Symbol of string list * string -> unit
  13. | Rest of string -> unit
  14. | Rest_all of string list -> unit
  15. | Expand of string -> string array
type key = string
type doc = string
type usage_msg = string
type anon_fun = string -> unit
val parse_dynamic : (key * spec * doc) list Stdlib.ref -> anon_fun -> usage_msg -> unit
val parse_argv : ?current:int Stdlib.ref -> string array -> (key * spec * doc) list -> anon_fun -> usage_msg -> unit
val parse_argv_dynamic : ?current:int Stdlib.ref -> string array -> (key * spec * doc) list Stdlib.ref -> anon_fun -> string -> unit
val parse_and_expand_argv_dynamic : int Stdlib.ref -> string array Stdlib.ref -> (key * spec * doc) list Stdlib.ref -> anon_fun -> string -> unit
val parse_expand : (key * spec * doc) list -> anon_fun -> usage_msg -> unit
exception Help of string
exception Bad of string
val usage_string : (key * spec * doc) list -> usage_msg -> string
val current : int Stdlib.ref
val read_arg : string -> string array
val read_arg0 : string -> string array
val write_arg : string -> string array -> unit
val write_arg0 : string -> string array -> unit
val describe : string -> string -> string -> string
val make_arg : < kind : string ; show : 'a -> string ; store : 'a -> 'b.. > -> string -> 'a -> string -> string * 'b * string
val test_int : (int -> bool) -> < kind : string ; show : int Stdlib.ref -> string ; store : int Stdlib.ref -> Stdlib.Arg.spec >
val string : < kind : string ; show : 'a Stdlib.ref -> 'a ; store : string Stdlib.ref -> Stdlib.Arg.spec >
val int_option : < kind : string ; show : int option Stdlib.ref -> string ; store : int option Stdlib.ref -> Stdlib.Arg.spec >
val float_option : < kind : string ; show : float option Stdlib.ref -> string ; store : float option Stdlib.ref -> Stdlib.Arg.spec >
val str_option : < kind : string ; show : string option Stdlib.ref -> string ; store : string option Stdlib.ref -> Stdlib.Arg.spec >
val int : string -> int Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val float : string -> float Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val str : string -> string Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val duration : string -> float Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val may_int : string -> int option Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val may_float : string -> float option Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val may_str : string -> string option Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val positive_int : string -> int Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val bool : string -> bool Stdlib.ref -> string -> string * Stdlib.Arg.spec * string
val usage_header : string
val align : ?sep:string -> (key * spec * doc) list -> (key * spec * doc) list
val parse : ?f:anon_fun -> (key * spec * doc) list -> unit
val usage : (key * spec * doc) list -> unit
val two_strings : (string -> string -> unit) -> Stdlib.Arg.spec
val rest : unit -> string list
OCaml

Innovation. Community. Security.