Args module

parse

procedure · 1 overloadSource

Parses the process's arguments. --help and --version print and exit 0; a bad command line prints the error with a usage hint to stderr and exits 2.

parse :: ($T: Type, $help: Help(T)) -> (T, Is_Set(T))

Parses the process's arguments. --help and --version print and exit 0; a bad command line prints the error with a usage hint to stderr and exits 2.

Parameters

$T: Type
the struct whose fields are the options.
$help: Help(T)
the help strings for T.

Returns

T

See also