Base
ArgParserResult a
The result of attempting to parse args into config data.
ArgParserParams
The parameters that an ArgParser
takes to extract data
from args.
ArgParserState a
The intermediate state that an ArgParser
passes between
different parsing steps.
ArgParser a
A function that takes command line arguments and a subcommand, and attempts to extract configuration data from said arguments.
on_successful_arg_parse : ArgParser a, (ArgParserState a -> ArgParserResult (ArgParserState b)) -> ArgParser b
A bind operation for ArgParserState
.
If an ArgParser
successfully parses some data, then said data
is provided to a callback and the resulting ArgParserResult
is
passed along in the newly bound ArgParser
.
map_successfully_parsed : ArgParserResult a, (a -> b) -> ArgParserResult b
Maps successfully parsed data that was parsed by an ArgParser
by a user-defined operation.
ArgExtractErr
Errors that can occur while extracting values from command line arguments.
str_type_name
num_type_name
TextStyle : [ Color, Plain ]
Whether help text should have fancy styling.
ExpectedValue
The type of value that an option expects to parse.
Plurality : [ Optional, One, Many ]
How many values an option/parameter can take.
SpecialFlags
The two built-in flags that we parse automatically.
InvalidValue
DefaultValue a : [ NoDefault, Value a, Generate ({} -> a) ]
ValueParser a
A parser that extracts an argument value from a string.
OptionConfigBaseParams
DefaultableOptionConfigBaseParams a
OptionConfigParams a
Default-value options for creating an option.
DefaultableOptionConfigParams a
Default-value options for creating an option.
OptionConfig
Metadata for options in our CLI building system.
help_option : OptionConfig
Metadata for the -h/--help
option that we parse automatically.
version_option : OptionConfig
Metadata for the -V/--version
option that we parse automatically.
ParameterConfigBaseParams
DefaultableParameterConfigBaseParams a
ParameterConfigParams a
Default-value options for creating an parameter.
DefaultableParameterConfigParams a
Default-value options for creating an parameter.
ParameterConfig
Metadata for parameters in our CLI building system.
CliConfigParams
Default-value options for bundling an CLI.
CliConfig
Metadata for a root-level CLI.
SubcommandConfigParams
Default-value options for bundling a subcommand.
SubcommandsConfig
Metadata for a set of subcommands under a parent command.
Since subcommands can have their own sub-subcommands, this type alias needs to be an enum with an empty variant to avoid infinite recursion.
SubcommandConfig
Metadata for a subcommand.