Use subcommand to define available commands and their actions, then pass
them to this computation to select one and run it. If the user specifies
an invalid subcommand, this computation will print an error and call
exitFailure. In handling of invalid flags or --help, runSubcommand
acts like runCommand.

Use of options may be arbitrarily nested. Library authors are encouraged
to aggregate their options into a single top-level type, so application
authors can include it easily in their own option definitions.

Advanted option definitions

All options must have a field name and one or more flags. Options may
also have a default value, a description, or a group.

The field name is how the option will be accessed in Haskell, and is
typically prefixed with "opt". This is used to define a record field,
and must be a valid Haskell field name (see defineOptions for details).

There are many types which an application or library might want
to use when designing their options. By default, options are
strings, but optionType may be set to any supported type. See
the "Option types" section for a list of supported types.

Option types

An option's type determines how the option will be parsed, and which
Haskell type the parsed value will be stored as. There are many types
available, covering most basic types and a few more advanced types.

Store an option value as a String. The value is decoded to Unicode
first, if needed. The value may contain non-Unicode bytes, in which case
they will be stored using GHC 7.4's encoding for mixed-use strings.

Store an option value as a Text. The value is decoded to Unicode
first, if needed. If the value cannot be decoded, the stored value may have
the Unicode substitution character '\65533' in place of some of the
original input.

Store an option as a Float. The option value must be a number. Due to
the imprecision of floating-point math, the stored value might not exactly
match the user's input. If the user's input is out of range for the
Float type, it will be stored as Infinity or -Infinity.

Store an option as a Double. The option value must be a number. Due to
the imprecision of floating-point math, the stored value might not exactly
match the user's input. If the user's input is out of range for the
Double type, it will be stored as Infinity or -Infinity.

Option groups

Option groups are used to make long --help output more readable, by
hiding obscure or rarely-used options from the main summary.

If an option is in a group named "examples", it will only be shown
in the help output if the user provides the flag --help-examples or
--help-all. The flag --help-all will show all options, in all groups.

Get a help message to show the user. If the arguments included
a help flag, this will be a message appropriate to that flag.
Otherwise, it is a summary (equivalent to --help).

This is always a non-empty string, regardless of whether the parse
succeeded or failed. If you need to perform additional validation
on the options value, this message can be displayed if validation
fails.

Attempt to convert a list of command-line arguments into an options
value. This can be used by application developers who want finer control
over error handling, or who want to perform additional validation on the
options value.

The argument list must be in the same encoding as the result of
getArgs.

Attempt to convert a list of command-line arguments into a subcommand
action. This can be used by application developers who want finer control
over error handling, or who want subcommands that run in an unusual monad.

The argument list must be in the same encoding as the result of
getArgs.