Arg.ConvArgument 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.
type 'a parser = string -> ('a, string) resultThe type for parsing arguments to values of type 'a.
type 'a fmt = Stdlib.Format.formatter -> 'a -> unitThe type for formatting values of type 'a.
val make :
?completion:'a Completion.t ->
docv:string ->
parser:'a parser ->
pp:'a fmt ->
unit ->
'a tmake ~docv ~parser ~pp () is an argument converter with given properties. See corresponding accessors for semantics.
val of_conv :
?completion:'a Completion.t ->
?docv:string ->
?parser:'a parser ->
?pp:'a fmt ->
'a t ->
'a tof_conv conv () is a new converter with given unspecified properties defaulting to those of conv.
val docv : 'a t -> stringdocv 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.tcompletion c is c's completion.