Arg.Conv
Argument converters.
An argument converter transforms a string argument of the command line to an OCaml value. Predefined converters are provided for many types of the standard library.
The type for parsing arguments to values of type 'a
.
val make :
?completion:'a Completion.t ->
docv:string ->
parser:'a parser ->
pp:'a fmt ->
unit ->
'a t
make ~docv ~parser ~pp ()
is an argument converter with given properties. See corresponding accessors for semantics.
val of_conv :
'a t ->
?completion:'a Completion.t ->
?docv:string ->
?parser:'a parser ->
?pp:'a fmt ->
unit ->
'a t
of_conv conv ()
is a new converter with given unspecified properties defaulting to those of conv
.
val docv : 'a t -> string
docv c
is c
's documentation meta-variable. This value can be refered to as $(docv)
in the documentation strings of arguments. It can be overriden by the info
value of an argument.
val completion : 'a t -> 'a Completion.t
completion c
is c
's completion.