This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>IBase__CommandLineOption (infer.IBase__CommandLineOption)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» IBase__CommandLineOption</nav><h1>Module <code>IBase__CommandLineOption</code></h1><p>Definition and parsing of command line arguments</p></header><dl><dtclass="spec value"id="val-warnf"><ahref="#val-warnf"class="anchor"></a><code><spanclass="keyword">val</span> warnf : <span><span>(<spanclass="type-var">'a</span>,Stdlib.Format.formatter,unit)</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.format</span><span>-></span><spanclass="type-var">'a</span></code></dt><dd><p>Print to stderr in case of error, fails in strict mode</p></dd></dl><dl><dtclass="spec type"id="type-parse_mode"><ahref="#type-parse_mode"class="anchor"></a><code><spanclass="keyword">type</span> parse_mode</code><code> = </code><tableclass="variant"><trid="type-parse_mode.InferCommand"class="anchored"><tdclass="def constructor"><ahref="#type-parse_mode.InferCommand"class="anchor"></a><code>| </code><code><spanclass="constructor">InferCommand</span></code></td><tdclass="doc"><p>parse arguments as arguments for infer</p></td></tr><trid="type-parse_mode.Javac"class="anchored"><tdclass="def constructor"><ahref="#type-parse_mode.Javac"class="anchor"></a><code>| </code><code><spanclass="constructor">Javac</span></code></td><tdclass="doc"><p>parse arguments passed to the Java compiler</p></td></tr><trid="type-parse_mode.NoParse"class="anchored"><tdclass="def constructor"><ahref="#type-parse_mode.NoParse"class="anchor"></a><code>| </code><code><spanclass="constructor">NoParse</span></code></td><tdclass="doc"><p>all arguments are anonymous arguments, no parsing is attempted</p></td></tr></table></dt></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_parse_mode"><ahref="#val-compare_parse_mode"class="anchor"></a><code><spanclass="keyword">val</span> compare_parse_mode : <ahref="index.html#type-parse_mode">parse_mode</a><span>-></span><ahref="index.html#type-parse_mode">parse_mode</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-is_originator"><ahref="#val-is_originator"class="anchor"></a><code><spanclass="keyword">val</span> is_originator : bool</code></dt><dtclass="spec value"id="val-init_work_dir"><ahref="#val-init_work_dir"class="anchor"></a><code><spanclass="keyword">val</span> init_work_dir : string</code></dt></dl><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span><span>'a t</span></code><code> = <span>?⁠deprecated:<span>string list</span></span><span>-></span><span>long:string</span><span>-></span><span>?⁠short:char</span><span>-></span><span>?⁠parse_mode:<ahref="index.html#type-parse_mode">parse_mode</a></span><span>-></span><span>?⁠in_help:<span><span>(<ahref="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> * string)</span> list</span></span><span>-></span><span>?⁠meta:string</span><span>-></span> string <span>-></span><spanclass="type-var">'a</span></code></dt><dd><p>The <code>mk_*</code> functions declare command line options, while <code>parse</code> parses then according to the declared options.</p><p>The arguments of the declaration functions are largely treated uniformly:</p><ul><li><code>long</code> declares the option <code>--long</code></li><li><code>short</code> declares the option <code>-short</code> as an alias</li><li><code>deprecated</code> declares the option <code>-key</code> as an alias, for each <code>key</code> in <code>deprecated</code></li><li><code>default</code> specifies the default value</li><li><code>default_to_string</code> is used to document the default value</li><li><code>f</code> specifies a transformation to be performed on the parsed value before setting the config variable</li><li><code>symbols</code> is an association list sometimes used in place of <code>f</code></li><li><code>parse_mode</code> declares which parse mode the option is for</li><li><code>in_help</code> indicates the man pages in which the command should be documented, as generated by calling infer with --help. Otherwise it appears only in --help-full.</li><li><code>meta</code> is a meta-variable naming the parsed value for documentation purposes</li><li>a documentation string</li></ul></dd></dl><dl><dtclass="spec value"id="val-mk_set"><ahref="#val-mk_set"class="anchor"></a><code><spanclass="keyword">val</span> mk_set : <span><spanclass="type-var">'a</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><span>-></span><spanclass="type-var">'a</span><span>-></span><span>unit <ahref="index.html#type-t">t</a></span></code></dt><dd><p><code>mk_set variable value</code> defines a command line option which sets <code>variable</code> to <code>value</code>.</p></dd></dl><dl><dtclass="spec value"id="val-mk_bool"><ahref="#val-mk_bool"class="anchor"></a><code><spanclass="keyword">val</span> mk_bool : <span>?⁠deprecated_no:<span>string list</span></span><span>-></span><span>?⁠default:bool</span><span>-></span><span>?⁠f:<span>(bool <span>-></span> bool)</span></span><span>-></span><span><span>bool <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p><code>mk_bool long short doc</code> defines a <code>bool ref</code> set by the command line flag <code>--long</code> (and <code>-s</code>), and cleared by the flag <code>--no-long</code> (and <code>-S</code>). If <code>long</code> already has a "no-" prefix, or <code>s</code> is capital, then the existing prefixes will instead be removed. The default value is <code>false</code> unless overridden by <code>~default:true</code>. The <code>doc</code> string will be prefixed with either "Activates:" or "Deactivates:", so should be phrased accordingly.</p></dd></dl><dl><dtclass="spec value"id="val-mk_bool_group"><ahref="#val-mk_bool_group"class="anchor"></a><code><spanclass="keyword">val</span> mk_bool_group : <span>?⁠deprecated_no:<span>string list</span></span><span>-></span><span>?⁠default:bool</span><span>-></span><span>?⁠f:<span>(bool <span>-></span> bool)</span></span><span>-></span><span><span>(<span><span>bool <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span> list</span><span>-></span><span><span>bool <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span> list</span><span>-></span><span>bool <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span>)</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p><code>mk_bool_group children not_children</code> behaves as <code>mk_bool</code> with the addition that all the <code>children</code> are also set and the <code>no_children</code> are unset. A child can be unset by including "--no-child" later in the arguments.</p></dd></dl><dl><dtclass="spec value"id="val-mk_int"><ahref="#val-mk_int"class="anchor"></a><code><spanclass="keyword">val</span> mk_int : <span>default:int</span><span>-></span><span>?⁠default_to_string:<span>(int <span>-></span> string)</span></span><span>-></span><span>?⁠f:<span>(int <span>-></span> int)</span></span><span>-></span><span><span>int <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dtclass="spec value"id="val-mk_int_opt"><ahref="#val-mk_int_opt"class="anchor"></a><code><spanclass="keyword">val</span> mk_int_opt : <span>?⁠default:int</span><span>-></span><span>?⁠default_to_string:<span>(<span>int option</span><span>-></span> string)</span></span><span>-></span><span>?⁠f:<span>(int <span>-></span> int)</span></span><span>-></span><span><span><span>int option</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dtclass="spec value"id="val-mk_float_opt"><ahref="#val-mk_float_opt"class="anchor"></a><code><spanclass="keyword">val</span> mk_float_opt : <span>?⁠default:float</span><span>-></span><span>?⁠default_to_string:<span>(<span>float option</span><span>-></span> string)</span></span><span>-></span><span><span><span>float option</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dtclass="spec value"id="val-mk_string"><ahref="#val-mk_string"class="anchor"></a><code><spanclass="keyword">val</span> mk_string : <span>default:string</span><span>-></span><span>?⁠default_to_string:<span>(string <span>-></span> string)</span></span><span>-></span><span>?⁠f:<span>(string <span>-></span> string)</span></span><span>-></span><span><span>string <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dtclass="spec value"id="val-mk_string_opt"><ahref="#val-mk_string_opt"class="anchor"></a><code><spanclass="keyword">val</span> mk_string_opt : <span>?⁠default:string</span><span>-></span><span>?⁠default_to_string:<span>(<span>string option</span><span>-></span> string)</span></span><span>-></span><span>?⁠f:<span>(string <span>-></span> string)</span></span><span>-></span><span>?⁠mk_reset:bool</span><span>-></span><span><span><span>string option</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p>An option "--<code>long</code>-reset" is automatically created that resets the reference to None when found on the command line, unless <code>mk_reset</code> is false.</p></dd></dl><dl><dtclass="spec value"id="val-mk_string_list"><ahref="#val-mk_string_list"class="anchor"></a><code><spanclass="keyword">val</span> mk_string_list : <span>?⁠default:<span>string list</span></span><span>-></span><span>?⁠default_to_string:<span>(<span>string list</span><span>-></span> string)</span></span><span>-></span><span>?⁠f:<span>(string <span>-></span> string)</span></span><span>-></span><span><span><span>string <ahref="../IStdlib/RevList/index.html#type-t">IStdlib.RevList.t</a></span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p><code>mk_string_list</code> defines a <code>string list ref</code>, initialized to <code>[]</code> unless overridden by <code>~default</code>. Each argument of an occurrence of the option will be prepended to the list, so the final value will be in the reverse order they appeared on the command line.</p><p>An option "--<code>long</code>-reset" is automatically created that resets the list to <code></code> when found on the command line.</p></dd></dl><dl><dtclass="spec value"id="val-mk_string_map"><ahref="#val-mk_string_map"class="anchor"></a><code><spanclass="keyword">val</span> mk_string_map : <span>?⁠default:<span>string <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.String.Map.t</span></span><span>-></span><span>?⁠default_to_string:<span>(<span>string <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.String.Map.t</span><span>-></span> string)</span></span><span>-></span><span><span><span>string <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.String.Map.t</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dtclass="spec value"id="val-mk_path"><ahref="#val-mk_path"class="anchor"></a><code><spanclass="keyword">val</span> mk_path : <span>default:string</span><span>-></span><span>?⁠default_to_string:<span>(string <span>-></span> string)</span></span><span>-></span><span>?⁠f:<span>(string <span>-></span> string)</span></span><span>-></span><span><span>string <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p>like <code>mk_string</code> but will resolve the string into an absolute path so that children processes agree on the absolute path that the option represents</p></dd></dl><dl><dtclass="spec value"id="val-mk_path_opt"><ahref="#val-mk_path_opt"class="anchor"></a><code><spanclass="keyword">val</span> mk_path_opt : <span>?⁠default:string</span><span>-></span><span>?⁠default_to_string:<span>(<span>string option</span><span>-></span> string)</span></span><span>-></span><span><span><span>string option</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p>analogous of <code>mk_string_opt</code> with the extra feature of <code>mk_path</code></p></dd></dl><dl><dtclass="spec value"id="val-mk_path_list"><ahref="#val-mk_path_list"class="anchor"></a><code><spanclass="keyword">val</span> mk_path_list : <span>?⁠default:<span>string list</span></span><span>-></span><span>?⁠default_to_string:<span>(<span>string list</span><span>-></span> string)</span></span><span>-></span><span><span><span>string <ahref="../IStdlib/RevList/index.html#type-t">IStdlib.RevList.t</a></span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p>analogous of <code>mk_string_list</code> with the extra feature of <code>mk_path</code></p></dd></dl><dl><dtclass="spec value"id="val-mk_symbol"><ahref="#val-mk_symbol"class="anchor"></a><code><spanclass="keyword">val</span> mk_symbol : <span>default:<spanclass="type-var">'a</span></span><span>-></span><span>symbols:<span><span>(string * <spanclass="type-var">'a</span>)</span> list</span></span><span>-></span><span>eq:<span>(<spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span><span>-></span> bool)</span></span><span>-></span><span>?⁠f:<span>(<spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span>)</span></span><span>-></span><span><span><spanclass="type-var">'a</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p><code>mk_symbol long symbols</code> defines a command line flag <code>--long <symbol></code> where <code>(<symbol>,_)</code> is an element of <code>symbols</code>.</p></dd></dl><dl><dtclass="spec value"id="val-mk_symbol_opt"><ahref="#val-mk_symbol_opt"class="anchor"></a><code><spanclass="keyword">val</span> mk_symbol_opt : <span>symbols:<span><span>(string * <spanclass="type-var">'a</span>)</span> list</span></span><span>-></span><span>?⁠f:<span>(<spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span>)</span></span><span>-></span><span>?⁠mk_reset:bool</span><span>-></span><span><span><span><spanclass="type-var">'a</span> option</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p><code>mk_symbol_opt</code> is similar to <code>mk_symbol</code> but defaults to <code>None</code>. If <code>mk_reset</code> is false then do not create an additional --<code>long</code>-reset option to reset the value of the option to <code>None</code>.</p></dd></dl><dl><dtclass="spec value"id="val-mk_symbol_seq"><ahref="#val-mk_symbol_seq"class="anchor"></a><code><spanclass="keyword">val</span> mk_symbol_seq : <span>?⁠default:<span><spanclass="type-var">'a</span> list</span></span><span>-></span><span>symbols:<span><span>(string * <spanclass="type-var">'a</span>)</span> list</span></span><span>-></span><span>eq:<span>(<spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span><span>-></span> bool)</span></span><span>-></span><span><span><span><spanclass="type-var">'a</span> list</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p><code>mk_symbol_seq long symbols</code> defines a command line flag <code>--long <symbol sequence></code> where <code><symbol sequence></code> is a comma-separated sequence of <code><symbol></code>s such that <code>(<symbol>,_)</code> is an element of <code>symbols</code>.</p></dd></dl><dl><dtclass="spec value"id="val-mk_json"><ahref="#val-mk_json"class="anchor"></a><code><spanclass="keyword">val</span> mk_json : <span><span>Yojson.Basic.t <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span><ahref="index.html#type-t">t</a></span></code></dt><dtclass="spec value"id="val-mk_anon"><ahref="#val-mk_anon"class="anchor"></a><code><spanclass="keyword">val</span> mk_anon : unit <span>-></span><span><span>string <ahref="../IStdlib/RevList/index.html#type-t">IStdlib.RevList.t</a></span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span></code></dt><dd><p><code>mk_anon ()</code> defines a <code>string list ref</code> of the anonymous command line arguments, in the reverse order they appeared on the command line.</p></dd></dl><dl><dtclass="spec value"id="val-mk_rest_actions"><ahref="#val-mk_rest_actions"class="anchor"></a><code><spanclass="keyword">val</span> mk_rest_actions : <span>?⁠parse_mode:<ahref="index.html#type-parse_mode">parse_mode</a></span><span>-></span><span>?⁠in_help:<span><span>(<ahref="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> * string)</span> list</span></span><span>-></span> string <span>-></span><span>usage:string</span><span>-></span><span>(string <span>-></span><ahref="index.html#type-parse_mode">parse_mode</a>)</span><span>-></span><span><span>string list</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span></code></dt><dd><p><code>mk_rest_actions doc ~usage command_to_parse_mode</code> defines a <code>string list ref</code> of the command line arguments following <code>"--"</code>, in the reverse order they appeared on the command line. <code>usage</code> is the usage message in case of parse errors or if --help is passed. For example, calling <code>mk_action</code> and parsing <code>exe -opt1 -opt2 -- arg1 arg2</code> will result in the returned ref containing <code>arg2; arg1</code>. Additionally, the first arg following <code>"--"</code> is passed to <code>command_to_parse_mode</code> to obtain the parse action that will be used to parse the remaining arguments.</p></dd></dl><dl><dtclass="spec type"id="type-command_doc"><ahref="#type-command_doc"class="anchor"></a><code><spanclass="keyword">type</span> command_doc</code></dt></dl><dl><dtclass="spec value"id="val-mk_command_doc"><ahref="#val-mk_command_doc"class="anchor"></a><code><spanclass="keyword">val</span> mk_command_doc : <span>title:string</span><span>-></span><span>section:int</span><span>-></span><span>version:string</span><span>-></span><span>date:string</span><span>-></span><span>short_description:string</span><span>-></span><span>synopsis:<span>Cmdliner.Manpage.block list</span></span><span>-></span><span>description:<span>Cmdliner.Manpage.block list</span></span><span>-></span><span>?⁠options:<span>[ <span>`Prepend of <span>Cmdliner.Manpage.block list</span></span><span><span>| `Replace</span> of <span>Cmdliner.Manpage.block list</span></span> ]</span></span><span>-></span><span>?⁠exit_status:<span>Cmdliner.Manpage.block list</span></span><span>-></span><span>?⁠environment:<span>Cmdliner.Manpage.block list</span></span><span>-></span><span>?⁠files:<span>Cmdliner.Manpage.block list</span></span><span>-></span><span>?⁠notes:<span>Cmdliner.Manpage.block list</span></span><span>-></span><span>?⁠bugs:<span>Cmdliner.Manpage.block list</span></span><span>-></span><span>?⁠examples:<span>Cmdliner.Manpage.block list</span></span><span>-></span><span>?⁠see_also:<span>Cmdliner.Manpage.block list</span></span><span>-></span> string <span>-></span><ahref="index.html#type-command_doc">command_doc</a></code></dt><dd><p><code>mk_command_doc ~title ~section ~version ~short_description ~synopsis ~description ~see_also
command_exe</code> records information about a command that is used to create its man page. A lot of the concepts are taken from man-pages(7).</p><ul><li><code>command_exe</code> is the name of the command, preferably an executable that selects the command</li><li><code>title</code> will be the title of the manual</li><li><code>section</code> will be the section of the manual (the number 7 in man-pages(7))</li><li><code>version</code> is the version string of the command</li><li><code>date</code> is the date of the last modification of the manual</li><li><code>short_description</code> is a one-line description of the command</li><li><code>options</code> can be either <code>`Replace blocks</code>, which populates the OPTIONS section with <code>blocks</code>, or <code>`Prepend blocks</code>, in which case the options from the command are used, prepended by <code>blocks</code>. If unspecified it defaults to <code>`Prepend []</code>.</li><li>All the other <code>section_name</code> options correspond to the contents of the section <code>section_name</code>. Some are mandatory and some are not.</li></ul></dd></dl><dl><dtclass="spec value"id="val-mk_subcommand"><ahref="#val-mk_subcommand"class="anchor"></a><code><spanclass="keyword">val</span> mk_subcommand : <ahref="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a><span>-></span><span>?⁠on_unknown_arg:<span>[ `Add <span>| `Skip</span><span>| `Reject</span> ]</span></span><span>-></span><span>name:string</span><span>-></span><span>?⁠deprecated_long:string</span><span>-></span><span>?⁠parse_mode:<ahref="index.html#type-parse_mode">parse_mode</a></span><span>-></span><span>?⁠in_help:<span><span>(<ahref="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> * string)</span> list</span></span><span>-></span><span><ahref="index.html#type-command_doc">command_doc</a> option</span><span>-></span> unit</code></dt><dd><p><code>mk_subcommand command ~long command_doc</code> defines the subcommand <code>command</code>. A subcommand is activated by passing <code>name</code>, and by passing <code>--deprecated_long</code> if specified. A man page is automatically generated for <code>command</code> based on the information in <code>command_doc</code>, if available (otherwise the command is considered internal). <code>on_unknown_arg</code> is the action taken on unknown anonymous arguments; it is `Reject by default.</p></dd></dl><dl><dtclass="spec value"id="val-args_env_var"><ahref="#val-args_env_var"class="anchor"></a><code><spanclass="keyword">val</span> args_env_var : string</code></dt><dd><p>environment variable use to pass arguments from parent to child processes</p></dd></dl><dl><dtclass="spec value"id="val-strict_mode_env_var"><ahref="#val-strict_mode_env_var"class="anchor"></a><code><spanclass="keyword">val</span> strict_mode_env_var : string</code></dt><dtclass="spec value"id="val-env_var_sep"><ahref="#val-env_var_sep"class="anchor"></a><code><spanclass="keyword">val</span> env_var_sep : char</code></dt><dd><p>separator of argv elements when encoded into environment variables</p></dd></dl><dl><dtclass="spec value"id="val-extend_env_args"><ahref="#val-extend_env_args"class="anchor"></a><code><spanclass="keyword">val</span> extend_env_args : <span>string list</span><span>-></span> unit</code></dt><dd><p><code>extend_env_args args</code> appends <code>args</code> to those passed via <code>args_env_var</code></p></dd></dl><dl><dtclass="spec value"id="val-parse"><ahref="#val-parse"class="anchor"></a><code><spanclass="keyword">val</span> parse : <span>?⁠config_file:string</span><span>-></span><span>usage:<ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Arg.usage_msg</span><span>-></span><ahref="index.html#type-parse_mode">parse_mode</a><span>-></span><span><ahref="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> option</span><span>-></span><span><ahref="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> option</span> * <span>(int <span>-></span><spanclass="type-var">'a</span>)</span></code></dt><dd><p><code>parse ~usage parse_mode command</code> parses command line arguments as specified by preceding calls to the <code>mk_*</code> functions, and returns:</p><ul><li>the command selected by the user on the command line, except if <code>command</code> is not None in which case it is considered "pre-selected" for the user;</li><li>a function that prints the usage message and help text then exits with the code passed as argument.</li></ul><p>The decoded values of the inferconfig file <code>config_file</code>, if provided, are parsed, followed by the decoded values of the environment variable <code>args_env_var</code>, followed by <code>Sys.argv</code> if <code>parse_mode</code> is one that should parse command line arguments (this is defined in the implementation of this module). Therefore arguments passed on the command line supersede those specified in the environment variable, which themselves supersede those passed via the config file.</p><p>WARNING: An argument will be interpreted as many times as it appears in all of the config file, the environment variable, and the command line. The <code>args_env_var</code> is set to the set of options parsed in <code>args_env_var</code> and on the command line.</p></dd></dl><dl><dtclass="spec value"id="val-is_env_var_set"><ahref="#val-is_env_var_set"class="anchor"></a><code><spanclass="keyword">val</span> is_env_var_set : string <span>-></span> bool</code></dt><dd><p><code>is_env_var_set var</code> is true if $<code>var</code>=1</p></dd></dl><dl><dtclass="spec value"id="val-show_manual"><ahref="#val-show_manual"class="anchor"></a><code><spanclass="keyword">val</span> show_manual : <span>?⁠scrub_defaults:bool</span><span>-></span><span>?⁠internal_section:string</span><span>-></span> Cmdliner.Manpage.format <span>-></span><ahref="index.html#type-command_doc">command_doc</a><span>-></span><span><ahref="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> option</span><span>-></span> unit</code></dt><dd><p>Display the manual of <code>command</code> to the user, or <code>command_doc</code> if <code>command</code> is None. <code>format</code> is used as for <code>Cmdliner.Manpage.print</code>. If <code>internal_section</code> is specified, add a section titled <code>internal_section</code> about internal (hidden) options. If <code>scrub_defaults</code> then do not print default values for options.</p></dd></dl><dl><dtclass="spec value"id="val-keep_args_file"><ahref="#val-keep_args_file"class="anchor"></a><code><spanclass="keyword">val</span> keep_args_file : <span>bool <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.ref</span></code></dt></dl></div></body></html>