sig
module Spec :
sig
type 'a param = 'a Core.Command.Spec.param
val const : 'a -> 'a param
val map : 'a param -> f:('a -> 'b) -> 'b param
val help : string Core.Std_internal.Lazy.t param
val path : string list param
val args : string list param
type ('main_in, 'main_out) t =
('main_in, 'main_out) Core.Command.Spec.t
val empty : ('m, 'm) t
val ( ++ ) : ('m1, 'm2) t -> ('m2, 'm3) t -> ('m1, 'm3) t
val ( +> ) : ('m1, 'a -> 'm2) t -> 'a param -> ('m1, 'm2) t
val ( +< ) : ('m1, 'm2) t -> 'a param -> ('a -> 'm1, 'm2) t
val step : ('m1 -> 'm2) -> ('m1, 'm2) t
val wrap :
(run:('m1 -> 'r1) -> main:'m2 -> 'r2) -> ('m1, 'r1) t -> ('m2, 'r2) t
module Arg_type :
sig
type 'a t = 'a Core.Command.Spec.Arg_type.t
val create :
?complete:(Core.Univ_map.t -> part:string -> string list) ->
?key:'a Core.Univ_map.Multi.Key.t -> (string -> 'a) -> 'a t
val of_map :
?key:'a Core.Univ_map.Multi.Key.t ->
'a Core.Std_internal.String.Map.t -> 'a t
val of_alist_exn :
?key:'a Core.Univ_map.Multi.Key.t -> (string * 'a) list -> 'a t
end
val string : string Arg_type.t
val int : int Arg_type.t
val float : float Arg_type.t
val bool : bool Arg_type.t
val date : Core.Date.t Arg_type.t
val time_span : Core.Span.t Arg_type.t
val file : string Arg_type.t
type 'a flag = 'a Core.Command.Spec.flag
val flag :
?aliases:string list -> string -> 'a flag -> doc:string -> 'a param
val required : 'a Arg_type.t -> 'a flag
val optional : 'a Arg_type.t -> 'a option flag
val optional_with_default : 'a -> 'a Arg_type.t -> 'a flag
val listed : 'a Arg_type.t -> 'a list flag
val no_arg : bool flag
val no_arg_register :
key:'a Core.Univ_map.With_default.Key.t -> value:'a -> bool flag
val no_arg_abort :
exit:(unit -> Core.Std_internal.never_returns) -> unit flag
val escape : string list option flag
type 'a anons = 'a Core.Command.Spec.anons
val anon : 'a anons -> 'a param
val ( %: ) : string -> 'a Arg_type.t -> 'a anons
val sequence : 'a anons -> 'a list anons
val maybe : 'a anons -> 'a option anons
val maybe_with_default : 'a -> 'a anons -> 'a anons
val t2 : 'a anons -> 'b anons -> ('a * 'b) anons
val t3 : 'a anons -> 'b anons -> 'c anons -> ('a * 'b * 'c) anons
val t4 :
'a anons ->
'b anons -> 'c anons -> 'd anons -> ('a * 'b * 'c * 'd) anons
end
type t = Core.Command.t
val basic :
summary:string ->
?readme:(unit -> string) -> ('main, unit -> unit) Spec.t -> 'main -> t
val group :
summary:string -> ?readme:(unit -> string) -> (string * t) list -> t
val run :
?version:string -> ?build_info:string -> ?argv:string list -> t -> unit
module Deprecated :
sig
module Spec :
sig
val no_arg : hook:(unit -> unit) -> bool Spec.flag
val escape :
hook:(string list -> unit) -> string list option Spec.flag
val ad_hoc : usage_arg:string -> string list Spec.anons
end
val summary : t -> string
val help_recursive :
cmd:string ->
with_flags:bool ->
expand_dots:bool -> t -> string -> (string * string) list
val run :
t ->
cmd:string ->
args:string list ->
is_help:bool ->
is_help_rec:bool ->
is_help_rec_flags:bool -> is_expand_dots:bool -> unit
val get_flag_names : t -> string list
val version : string
val build_info : string
end
end