Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Functions for reading various options from a command line.
read_full_eval argv
reads the --eval option from argv
; the return value is None
if option is absent in argv
.
A value of type configure_args
is the result of parsing the arguments of a configure
subcommand.
A value of type describe_args
is the result of parsing the arguments to a describe
subcommand.
The result
field holds the result of parsing the "additional" arguments whose specification is passed as the describe
argument to parse_args
.
type 'a action =
| Configure of 'a configure_args
| Describe of 'a describe_args
| Build of 'a
| Clean of 'a
| Help
A value of type action
is the result of parsing command-line arguments using parse_args
.
val parse_args :
?help_ppf:Stdlib.Format.formatter ->
?err_ppf:Stdlib.Format.formatter ->
name:string ->
version:string ->
configure:'a Cmdliner.Term.t ->
describe:'a Cmdliner.Term.t ->
build:'a Cmdliner.Term.t ->
clean:'a Cmdliner.Term.t ->
help:_ Cmdliner.Term.t ->
string array ->
'a action Cmdliner.Term.result
Parse the functoria command line. The arguments to ~configure
, ~describe
, etc., describe extra command-line arguments that should be accepted by the corresponding subcommands. The full argument specification is as follows:
name configure -v|--verbose
--color=(auto|always|never)
extra arguments
name describe --eval
-v|--verbose
--color=(auto|always|never)
-o FILE | --output=FILE
--dot-command=COMMAND
--dot
extra arguments
name build -v|--verbose
--color=(auto|always|never)
extra arguments
name clean -v|--verbose
--color=(auto|always|never)
extra arguments
name help -v|--verbose
--color=(auto|always|never)
--man-format=(groff|pager|plain)
configure|describe|build|clean|help|topics
extra arguments
name -v|--verbose
--color=(auto|always|never)
There are no side effects, save for the printing of usage messages and other help when either the 'help' subcommand or no subcommand is specified.