`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
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 pure : 'a -> 'a Cmdliner.Term.t
val man_format : Cmdliner.Manpage.format 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
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
val term_result :
?usage:bool ->
('a, [ `Msg of 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 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 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 -> 'a Cmdliner.Term.result -> int
val exit_status_of_status_result :
?term_err:int -> int Cmdliner.Term.result -> int
val exit : ?term_err:int -> 'a Cmdliner.Term.result -> unit
val exit_status : ?term_err:int -> int Cmdliner.Term.result -> unit
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
type 'a converter = 'a Cmdliner.Arg.conv
val conv :
?docv:string ->
(string -> ('a, [ `Msg of string ]) Stdlib.result) *
'a Cmdliner.Arg.printer -> 'a Cmdliner.Arg.conv
val pconv :
?docv:string ->
'a Cmdliner.Arg.parser * '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:string -> 'a Cmdliner.Arg.conv -> 'a option Cmdliner.Arg.conv
type env = Cmdliner.Term.env_info
val env_var : ?docs:string -> ?doc:string -> string -> Cmdliner.Arg.env
type 'a t
type info
val info :
?docs:string ->
?docv:string ->
?doc:string ->
?env:Cmdliner.Arg.env -> 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
end
end`