`sig
module Manpage :
sig
type block =
[ `Blocks of Cmdliner.Manpage.block list
| `I of string * string
| `Noblank
| `P of string
| `Pre of string
| `S of string ]
val escape : string -> string
type title = string * int * string * string * string
type t = Cmdliner.Manpage.title * Cmdliner.Manpage.block list
type xref =
[ `Cmd of string | `Main | `Page of string * int | `Tool of string
]
val s_name : string
val s_synopsis : string
val s_description : string
val s_commands : string
val s_arguments : string
val s_options : string
val s_common_options : string
val s_exit_status : string
val s_environment : string
val s_environment_intro : Cmdliner.Manpage.block
val s_files : string
val s_bugs : string
val s_examples : string
val s_authors : string
val s_see_also : string
val s_none : string
type format = [ `Auto | `Groff | `Pager | `Plain ]
val print :
?errs:Stdlib.Format.formatter ->
?subst:(string -> string option) ->
Cmdliner.Manpage.format ->
Stdlib.Format.formatter -> Cmdliner.Manpage.t -> unit
end
module Term :
sig
type +'a t
val const : 'a -> 'a Cmdliner.Term.t
val ( $ ) :
('a -> 'b) Cmdliner.Term.t ->
'a Cmdliner.Term.t -> 'b Cmdliner.Term.t
val app :
('a -> 'b) Cmdliner.Term.t ->
'a Cmdliner.Term.t -> 'b Cmdliner.Term.t
val map : ('a -> 'b) -> 'a Cmdliner.Term.t -> 'b Cmdliner.Term.t
val product :
'a Cmdliner.Term.t -> 'b Cmdliner.Term.t -> ('a * 'b) Cmdliner.Term.t
module Syntax :
sig
val ( let+ ) :
'a Cmdliner.Term.t -> ('a -> 'b) -> 'b Cmdliner.Term.t
val ( and+ ) :
'a Cmdliner.Term.t ->
'b Cmdliner.Term.t -> ('a * 'b) Cmdliner.Term.t
end
val term_result :
?usage:bool ->
('a, [ `Msg of string ]) Stdlib.result Cmdliner.Term.t ->
'a Cmdliner.Term.t
val term_result' :
?usage:bool ->
('a, string) Stdlib.result Cmdliner.Term.t -> 'a Cmdliner.Term.t
val cli_parse_result :
('a, [ `Msg of string ]) Stdlib.result Cmdliner.Term.t ->
'a Cmdliner.Term.t
val cli_parse_result' :
('a, string) Stdlib.result Cmdliner.Term.t -> 'a Cmdliner.Term.t
val main_name : string Cmdliner.Term.t
val choice_names : string list Cmdliner.Term.t
val with_used_args :
'a Cmdliner.Term.t -> ('a * string list) Cmdliner.Term.t
type 'a ret =
[ `Error of bool * string
| `Help of Cmdliner.Manpage.format * string option
| `Ok of 'a ]
val ret : 'a Cmdliner.Term.ret Cmdliner.Term.t -> 'a Cmdliner.Term.t
type exit_info
val exit_info :
?docs:string ->
?doc:string -> ?max:int -> int -> Cmdliner.Term.exit_info
val default_exits : Cmdliner.Term.exit_info list
val default_error_exits : Cmdliner.Term.exit_info list
type env_info
val env_info :
?docs:string -> ?doc:string -> string -> Cmdliner.Term.env_info
type info
val info :
?man_xrefs:Cmdliner.Manpage.xref list ->
?man:Cmdliner.Manpage.block list ->
?envs:Cmdliner.Term.env_info list ->
?exits:Cmdliner.Term.exit_info list ->
?sdocs:string ->
?docs:string ->
?doc:string -> ?version:string -> string -> Cmdliner.Term.info
val name : Cmdliner.Term.info -> string
type 'a result =
[ `Error of [ `Exn | `Parse | `Term ]
| `Help
| `Ok of 'a
| `Version ]
val eval :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
'a Cmdliner.Term.t * Cmdliner.Term.info -> 'a Cmdliner.Term.result
val eval_choice :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
'a Cmdliner.Term.t * Cmdliner.Term.info ->
('a Cmdliner.Term.t * Cmdliner.Term.info) list ->
'a Cmdliner.Term.result
val eval_peek_opts :
?version_opt:bool ->
?env:(string -> string option) ->
?argv:string array ->
'a Cmdliner.Term.t -> 'a option * 'a Cmdliner.Term.result
val exit_status_success : int
val exit_status_cli_error : int
val exit_status_internal_error : int
val exit_status_of_result :
?term_err:int -> unit Cmdliner.Term.result -> int
val exit_status_of_status_result :
?term_err:int -> int Cmdliner.Term.result -> int
val exit : ?term_err:int -> unit Cmdliner.Term.result -> unit
val exit_status : ?term_err:int -> int Cmdliner.Term.result -> unit
val pure : 'a -> 'a Cmdliner.Term.t
val man_format : Cmdliner.Manpage.format Cmdliner.Term.t
end
module Cmd :
sig
module Exit :
sig
type code = int
val ok : Cmdliner.Cmd.Exit.code
val some_error : Cmdliner.Cmd.Exit.code
val cli_error : Cmdliner.Cmd.Exit.code
val internal_error : Cmdliner.Cmd.Exit.code
type info
val info :
?docs:string ->
?doc:string ->
?max:Cmdliner.Cmd.Exit.code ->
Cmdliner.Cmd.Exit.code -> Cmdliner.Cmd.Exit.info
val info_code : Cmdliner.Cmd.Exit.info -> Cmdliner.Cmd.Exit.code
val defaults : Cmdliner.Cmd.Exit.info list
end
module Env :
sig
type var = string
type info = Cmdliner.Term.env_info
val info :
?deprecated:string ->
?docs:string ->
?doc:string -> Cmdliner.Cmd.Env.var -> Cmdliner.Cmd.Env.info
end
type info
val info :
?deprecated:string ->
?man_xrefs:Cmdliner.Manpage.xref list ->
?man:Cmdliner.Manpage.block list ->
?envs:Cmdliner.Cmd.Env.info list ->
?exits:Cmdliner.Cmd.Exit.info list ->
?sdocs:string ->
?docs:string ->
?doc:string -> ?version:string -> string -> Cmdliner.Cmd.info
type 'a t
val v : Cmdliner.Cmd.info -> 'a Cmdliner.Term.t -> 'a Cmdliner.Cmd.t
val group :
?default:'a Cmdliner.Term.t ->
Cmdliner.Cmd.info -> 'a Cmdliner.Cmd.t list -> 'a Cmdliner.Cmd.t
val name : 'a Cmdliner.Cmd.t -> string
val eval :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
?term_err:Cmdliner.Cmd.Exit.code ->
unit Cmdliner.Cmd.t -> Cmdliner.Cmd.Exit.code
val eval' :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
?term_err:Cmdliner.Cmd.Exit.code ->
Cmdliner.Cmd.Exit.code Cmdliner.Cmd.t -> Cmdliner.Cmd.Exit.code
val eval_result :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
?term_err:Cmdliner.Cmd.Exit.code ->
(unit, string) Stdlib.result Cmdliner.Cmd.t -> Cmdliner.Cmd.Exit.code
val eval_result' :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
?term_err:Cmdliner.Cmd.Exit.code ->
(Cmdliner.Cmd.Exit.code, string) Stdlib.result Cmdliner.Cmd.t ->
Cmdliner.Cmd.Exit.code
type 'a eval_ok = [ `Help | `Ok of 'a | `Version ]
type eval_error = [ `Exn | `Parse | `Term ]
type 'a eval_exit = [ `Exit of Cmdliner.Cmd.Exit.code | `Ok of 'a ]
val eval_value :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
'a Cmdliner.Cmd.t ->
('a Cmdliner.Cmd.eval_ok, Cmdliner.Cmd.eval_error) Stdlib.result
val eval_value' :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
?term_err:int -> 'a Cmdliner.Cmd.t -> 'a Cmdliner.Cmd.eval_exit
val eval_peek_opts :
?version_opt:bool ->
?env:(string -> string option) ->
?argv:string array ->
'a Cmdliner.Term.t ->
'a option *
('a Cmdliner.Cmd.eval_ok, Cmdliner.Cmd.eval_error) Stdlib.result
end
module Arg :
sig
type 'a parser = string -> [ `Error of string | `Ok of 'a ]
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a conv = 'a Cmdliner.Arg.parser * 'a Cmdliner.Arg.printer
val conv :
?docv:string ->
(string -> ('a, [ `Msg of string ]) Stdlib.result) *
'a Cmdliner.Arg.printer -> 'a Cmdliner.Arg.conv
val conv' :
?docv:string ->
(string -> ('a, string) Stdlib.result) * 'a Cmdliner.Arg.printer ->
'a Cmdliner.Arg.conv
val conv_parser :
'a Cmdliner.Arg.conv ->
string -> ('a, [ `Msg of string ]) Stdlib.result
val conv_printer : 'a Cmdliner.Arg.conv -> 'a Cmdliner.Arg.printer
val conv_docv : 'a Cmdliner.Arg.conv -> string
val parser_of_kind_of_string :
kind:string ->
(string -> 'a option) ->
string -> ('a, [ `Msg of string ]) Stdlib.result
val some' :
?none:'a -> 'a Cmdliner.Arg.conv -> 'a option Cmdliner.Arg.conv
val some :
?none:string -> 'a Cmdliner.Arg.conv -> 'a option Cmdliner.Arg.conv
type 'a t
type info
val info :
?deprecated:string ->
?absent:string ->
?docs:string ->
?docv:string ->
?doc:string ->
?env:Cmdliner.Cmd.Env.info -> string list -> Cmdliner.Arg.info
val ( & ) : ('a -> 'b) -> 'a -> 'b
val flag : Cmdliner.Arg.info -> bool Cmdliner.Arg.t
val flag_all : Cmdliner.Arg.info -> bool list Cmdliner.Arg.t
val vflag : 'a -> ('a * Cmdliner.Arg.info) list -> 'a Cmdliner.Arg.t
val vflag_all :
'a list -> ('a * Cmdliner.Arg.info) list -> 'a list Cmdliner.Arg.t
val opt :
?vopt:'a ->
'a Cmdliner.Arg.conv -> 'a -> Cmdliner.Arg.info -> 'a Cmdliner.Arg.t
val opt_all :
?vopt:'a ->
'a Cmdliner.Arg.conv ->
'a list -> Cmdliner.Arg.info -> 'a list Cmdliner.Arg.t
val pos :
?rev:bool ->
int ->
'a Cmdliner.Arg.conv -> 'a -> Cmdliner.Arg.info -> 'a Cmdliner.Arg.t
val pos_all :
'a Cmdliner.Arg.conv ->
'a list -> Cmdliner.Arg.info -> 'a list Cmdliner.Arg.t
val pos_left :
?rev:bool ->
int ->
'a Cmdliner.Arg.conv ->
'a list -> Cmdliner.Arg.info -> 'a list Cmdliner.Arg.t
val pos_right :
?rev:bool ->
int ->
'a Cmdliner.Arg.conv ->
'a list -> Cmdliner.Arg.info -> 'a list Cmdliner.Arg.t
val value : 'a Cmdliner.Arg.t -> 'a Cmdliner.Term.t
val required : 'a option Cmdliner.Arg.t -> 'a Cmdliner.Term.t
val non_empty : 'a list Cmdliner.Arg.t -> 'a list Cmdliner.Term.t
val last : 'a list Cmdliner.Arg.t -> 'a Cmdliner.Term.t
val man_format : Cmdliner.Manpage.format Cmdliner.Term.t
val bool : bool Cmdliner.Arg.conv
val char : char Cmdliner.Arg.conv
val int : int Cmdliner.Arg.conv
val nativeint : nativeint Cmdliner.Arg.conv
val int32 : int32 Cmdliner.Arg.conv
val int64 : int64 Cmdliner.Arg.conv
val float : float Cmdliner.Arg.conv
val string : string Cmdliner.Arg.conv
val enum : (string * 'a) list -> 'a Cmdliner.Arg.conv
val file : string Cmdliner.Arg.conv
val dir : string Cmdliner.Arg.conv
val non_dir_file : string Cmdliner.Arg.conv
val list :
?sep:char -> 'a Cmdliner.Arg.conv -> 'a list Cmdliner.Arg.conv
val array :
?sep:char -> 'a Cmdliner.Arg.conv -> 'a array Cmdliner.Arg.conv
val pair :
?sep:char ->
'a Cmdliner.Arg.conv ->
'b Cmdliner.Arg.conv -> ('a * 'b) Cmdliner.Arg.conv
val t2 :
?sep:char ->
'a Cmdliner.Arg.conv ->
'b Cmdliner.Arg.conv -> ('a * 'b) Cmdliner.Arg.conv
val t3 :
?sep:char ->
'a Cmdliner.Arg.conv ->
'b Cmdliner.Arg.conv ->
'c Cmdliner.Arg.conv -> ('a * 'b * 'c) Cmdliner.Arg.conv
val t4 :
?sep:char ->
'a Cmdliner.Arg.conv ->
'b Cmdliner.Arg.conv ->
'c Cmdliner.Arg.conv ->
'd Cmdliner.Arg.conv -> ('a * 'b * 'c * 'd) Cmdliner.Arg.conv
val doc_quote : string -> string
val doc_alts : ?quoted:bool -> string list -> string
val doc_alts_enum : ?quoted:bool -> (string * 'a) list -> string
type 'a converter = 'a Cmdliner.Arg.conv
val pconv :
?docv:string ->
'a Cmdliner.Arg.parser * 'a Cmdliner.Arg.printer ->
'a Cmdliner.Arg.conv
type env = Cmdliner.Cmd.Env.info
val env_var :
?deprecated:string ->
?docs:string ->
?doc:string -> Cmdliner.Cmd.Env.var -> Cmdliner.Cmd.Env.info
end
end`