= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
ON THIS PAGE
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Parameters
module M : sig ... end
Signature
val main :
?on_error:(unit -> unit) ->
?on_exit:(unit -> unit) ->
?print_config:(unit -> unit) ->
?common_args:(string list * spec * TYPES.info) list ->
?argv:string array ->
TYPES.sub list ->
unit
main ?on_error ?print_config ?common_args ?argv subcommands
parse arguments and execute corresponding subcommands.
subcommands
: multi-level subcommands. Multiple keywords are separated by spaces within the subcommand name.?on_error
: function called when an exception is raised.?on_exit
: function called on exit when no exception is raised.?print_config
: function called when no sub-command is provided.?common_args
: additional common arguments (common to all subcommands).-v|--verbose|-q|--quiet
are always included.?argv
: list of arguments used instead ofSys.argv
.