Library
Module
Module type
Parameter
Class
Class type
Refer to the Arguments terminology.
val return : 'a -> 'a t
val flag : string Nonempty_list.t -> doc:string -> bool t
A flag that may appear at most once on the command line.
val flag_count : string Nonempty_list.t -> doc:string -> int t
A flag that may appear multiple times on the command line. Evaluates to the number of times the flag appeared.
val named :
?docv:string ->
string Nonempty_list.t ->
'a Param.t ->
doc:string ->
'a t
A required named argument (must appear exactly once on the command line).
val named_multi :
?docv:string ->
string Nonempty_list.t ->
'a Param.t ->
doc:string ->
'a list t
A named argument that may appear multiple times on the command line.
val named_opt :
?docv:string ->
string Nonempty_list.t ->
'a Param.t ->
doc:string ->
'a option t
An optional named argument (may appear at most once).
val named_with_default :
?docv:string ->
string Nonempty_list.t ->
'a Param.t ->
default:'a ->
doc:string ->
'a t
An optional named argument with a default value.
Positional argument start at index 0.
A required positional argument. It must appear exactly once at position i
on the command line.
An optional positional argument at position i
. Optional positional argument must not be followed by more positional argument as this creates ambiguous specifications.
A optional positional argument with a default value.