Class type Flags.flag_type


class type [['a, 'b]] flag_type = object .. end
signature for all flags

A flag represents a setting (Flags.flag_type.value). Its input might 'b be of a different type than the stored setting 'a, especially for the special flags which take strings as input, but store custom types internally (opt_xxx ).


method id : flag_id
the flag id.
method short_name : string
e.g. "-db".
method long_name : string
e.g. "--depth-bound".
method description : string list
e.g. "Initial depth bound.".
method value : 'a
e.g. 3.
method is_default : bool
false iff the value was specified by a command line flag
method argument_to_string : 'b -> string
string representation of an argument.
method value_to_string : 'a -> string
string representation of a value.
method opt_to_string : string list
string representation of the valid arguments.
method signature : string
the range of valid values.
method set : 'b -> unit
performs a validity check and updates the flag's value resp.
Raises Arg.Bad exception on failure.
method set_opt : 'a -> unit
changes the value according to the argument.