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.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>InferStdlib__Pp (InferStdlib.InferStdlib__Pp)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><metaname="generator"content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><navid="top"><ahref="../index.html">Up</a>—<spanclass="package">package <ahref="../index.html">InferStdlib</a></span></nav><header><h1><spanclass="keyword">Module</span><spanclass="module-path">InferStdlib__Pp</span></h1></header><divclass="spec module"id="module-F"><ahref="#module-F"class="anchor"></a><divclass="def module"><code><spanclass="keyword">module </span>F = Format</code></div><divclass="doc"></div></div><p>Pretty Printing</p><divclass="spec type"id="type-color"><ahref="#type-color"class="anchor"></a><divclass="def type"><code><spanclass="keyword">type </span>color</code><code></code><code><spanclass="keyword"> = </span></code><tableclass="variant"><trid="type-color.Black"class="anchored"><tdclass="def constructor"><ahref="#type-color.Black"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">Black</span></code></td></tr><trid="type-color.Blue"class="anchored"><tdclass="def constructor"><ahref="#type-color.Blue"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">Blue</span></code></td></tr><trid="type-color.Green"class="anchored"><tdclass="def constructor"><ahref="#type-color.Green"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">Green</span></code></td></tr><trid="type-color.Orange"class="anchored"><tdclass="def constructor"><ahref="#type-color.Orange"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">Orange</span></code></td></tr><trid="type-color.Red"class="anchored"><tdclass="def constructor"><ahref="#type-color.Red"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">Red</span></code></td></tr></table><code></code></div><divclass="doc"><p>Colors supported in printing</p></div></div><divclass="spec include"><divclass="doc"></div><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include </span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></span></summary><divclass="spec val"id="val-compare_color"><ahref="#val-compare_color"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>compare_color : <ahref="index.html#type-color">color</a><spanclass="keyword">‑></span><ahref="index.html#type-color">color</a><spanclass="keyword">‑></span> int</code></div><divclass="doc"></div></div></details></div><divclass="spec val"id="val-equal_color"><ahref="#val-equal_color"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>equal_color : <ahref="index.html#type-color">color</a><spanclass="keyword">‑></span><ahref="index.html#type-color">color</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"></div></div><divclass="spec type"id="type-colormap"><ahref="#type-colormap"class="anchor"></a><divclass="def type"><code><spanclass="keyword">type </span>colormap</code><code><spanclass="keyword"> = </span>Obj.t <spanclass="keyword">‑></span><ahref="index.html#type-color">color</a></code><code></code></div><divclass="doc"><p>map subexpressions (as Obj.t element compared by physical equality) to colors</p></div></div><divclass="spec type"id="type-simple_kind"><ahref="#type-simple_kind"class="anchor"></a><divclass="def type"><code><spanclass="keyword">type </span>simple_kind</code><code></code><code><spanclass="keyword"> = </span></code><tableclass="variant"><trid="type-simple_kind.SIM_DEFAULT"class="anchored"><tdclass="def constructor"><ahref="#type-simple_kind.SIM_DEFAULT"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">SIM_DEFAULT</span></code></td></tr><trid="type-simple_kind.SIM_WITH_TYP"class="anchored"><tdclass="def constructor"><ahref="#type-simple_kind.SIM_WITH_TYP"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">SIM_WITH_TYP</span></code></td></tr></table><code></code></div><divclass="doc"><p>Kind of simple printing: default or with full types</p></div></div><divclass="spec type"id="type-print_kind"><ahref="#type-print_kind"class="anchor"></a><divclass="def type"><code><spanclass="keyword">type </span>print_kind</code><code></code><code><spanclass="keyword"> = </span></code><tableclass="variant"><trid="type-print_kind.TEXT"class="anchored"><tdclass="def constructor"><ahref="#type-print_kind.TEXT"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">TEXT</span></code></td></tr><trid="type-print_kind.HTML"class="anchored"><tdclass="def constructor"><ahref="#type-print_kind.HTML"class="anchor"></a><code><spanclass="keyword">| </span></code><code><spanclass="constructor">HTML</span></code></td></tr></table><code></code></div><divclass="doc"><p>Kind of printing</p></div></div><divclass="spec include"><divclass="doc"></div><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include </span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></span></summary><divclass="spec val"id="val-compare_print_kind"><ahref="#val-compare_print_kind"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>compare_print_kind : <ahref="index.html#type-print_kind">print_kind</a><spanclass="keyword">‑></span><ahref="index.html#type-print_kind">print_kind</a><spanclass="keyword">‑></span> int</code></div><divclass="doc"></div></div></details></div><divclass="spec val"id="val-equal_print_kind"><ahref="#val-equal_print_kind"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>equal_print_kind : <ahref="index.html#type-print_kind">print_kind</a><spanclass="keyword">‑></span><ahref="index.html#type-print_kind">print_kind</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"></div></div><divclass="spec type"id="type-env"><ahref="#type-env"class="anchor"></a><divclass="def type"><code><spanclass="keyword">type </span>env</code><code></code><code><spanclass="keyword"> = </span></code><code>{</code><tableclass="record"><trid="type-env.opt"class="anchored"><tdclass="def field"><ahref="#type-env.opt"class="anchor"></a><code>opt : <ahref="index.html#type-simple_kind">simple_kind</a>;</code></td><tdclass="doc"><p>(** Current option for simple printing *)</p></td></tr><trid="type-env.kind"class="anchored"><tdclass="def field"><ahref="#type-env.kind"class="anchor"></a><code>kind : <ahref="index.html#type-print_kind">print_kind</a>;</code></td><tdclass="doc"><p>(** Current kind of printing *)</p></td></tr><trid="type-env.break_lines"class="anchored"><tdclass="def field"><ahref="#type-env.break_lines"class="anchor"></a><code>break_lines : bool;</code></td><tdclass="doc"><p>(** whether to let Format add its own line breaks or not (false by default) *)</p></td></tr><trid="type-env.cmap_norm"class="anchored"><tdclass="def field"><ahref="#type-env.cmap_norm"class="anchor"></a><code>cmap_norm : <ahref="index.html#type-colormap">colormap</a>;</code></td><tdclass="doc"><p>(** Current colormap for the normal part *)</p></td></tr><trid="type-env.cmap_foot"class="anchored"><tdclass="def field"><ahref="#type-env.cmap_foot"class="anchor"></a><code>cmap_foot : <ahref="index.html#type-colormap">colormap</a>;</code></td><tdclass="doc"><p>(** Current colormap for the footprint part *)</p></td></tr><trid="type-env.color"class="anchored"><tdclass="def field"><ahref="#type-env.color"class="anchor"></a><code>color : <ahref="index.html#type-color">color</a>;</code></td><tdclass="doc"><p>(** Current color *)</p></td></tr><trid="type-env.obj_sub"class="anchored"><tdclass="def field"><ahref="#type-env.obj_sub"class="anchor"></a><code>obj_sub : (Obj.t <spanclass="keyword">‑></span> Obj.t) option;</code></td><tdclass="doc"><p>(** generic object substitution *)</p></td></tr></table><code>}</code><code></code></div><divclass="doc"><p>Print environment threaded through all the printing functions</p></div></div><divclass="spec val"id="val-reset_obj_sub"><ahref="#val-reset_obj_sub"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>reset_obj_sub : <ahref="index.html#type-env">env</a><spanclass="keyword">‑></span><ahref="index.html#type-env">env</a></code></div><divclass="doc"><p>Reset the object substitution, so that no substitution takes place</p></div></div><divclass="spec val"id="val-set_obj_sub"><ahref="#val-set_obj_sub"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>set_obj_sub : <ahref="index.html#type-env">env</a><spanclass="keyword">‑></span> (<spanclass="type-var">'a</span><spanclass="keyword">‑></span><spanclass="type-var">'a</span>) <spanclass="keyword">‑></span><ahref="index.html#type-env">env</a></code></div><divclass="doc"><p>Set the object substitution, which is supposed to preserve the type.
Currently only used for a map from (identifier) expressions to the program var containing them</p></div></div><divclass="spec val"id="val-colormap_red"><ahref="#val-colormap_red"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>colormap_red : <ahref="index.html#type-colormap">colormap</a></code></div><divclass="doc"><p>red colormap</p></div></div><divclass="spec val"id="val-extend_colormap"><ahref="#val-extend_colormap"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>extend_colormap : <ahref="index.html#type-env">env</a><spanclass="keyword">‑></span> Obj.t <spanclass="keyword">‑></span><ahref="index.html#type-color">color</a><spanclass="keyword">‑></span><ahref="index.html#type-env">env</a></code></div><divclass="doc"><p>Extend the normal colormap for the given object with the given color</p></div></div><divclass="spec val"id="val-text"><ahref="#val-text"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>text : <ahref="index.html#type-env">env</a></code></div><divclass="doc"><p>Default text print environment</p></div></div><divclass="spec val"id="val-text_break"><ahref="#val-text_break"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>text_break : <ahref="index.html#type-env">env</a></code></div><divclass="doc"><p>text print environment that allows line breaks</p></div></div><divclass="spec val"id="val-html"><ahref="#val-html"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>html : <ahref="index.html#type-color">color</a><spanclass="keyword">‑></span><ahref="index.html#type-env">env</a></code></div><divclass="doc"><p>Default html print environment</p></div></div><divclass="spec val"id="val-color_string"><ahref="#val-color_string"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>color_string : <ahref="index.html#type-color">color</a><spanclass="keyword">‑></span> string</code></div><divclass="doc"><p>string representation of colors</p></div></div><divclass="spec val"id="val-option"><ahref="#val-option"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>option : (<ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span><ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span> option <spanclass="keyword">‑></span> unit</code></div><divclass="doc"></div></div><divclass="spec val"id="val-cli_args"><ahref="#val-cli_args"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>cli_args : <ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span> string list <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>pretty print command line arguments, expanding argument files to print their contents</p></div></div><divclass="spec val"id="val-seq"><ahref="#val-seq"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>seq : ?⁠print_env:<ahref="index.html#type-env">env</a><spanclass="keyword">‑></span> ?⁠sep:string <spanclass="keyword">‑></span> ?⁠sep_html:string <spanclass="keyword">‑></span> (<ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span><ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span> list <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Pretty print a sequence with <codeclass="code">sep</code> followed by a space between each element. By default,
<codeclass="code">print_env</code> is <codeclass="code">text</code>, <codeclass="code">sep</code> is "", and <codeclass="code">sep_html</code> set to <codeclass="code">sep</code>.</p></div></div><divclass="spec val"id="val-comma_seq"><ahref="#val-comma_seq"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>comma_seq : ?⁠print_env:<ahref="index.html#type-env">env</a><spanclass="keyword">‑></span> (<ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span><ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span> list <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Pretty print a comma-separated sequence.</p></div></div><divclass="spec val"id="val-semicolon_seq"><ahref="#val-semicolon_seq"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>semicolon_seq : ?⁠print_env:<ahref="index.html#type-env">env</a><spanclass="keyword">‑></span> (<ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span><ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span> list <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Pretty print a ;-separated sequence</p></div></div><divclass="spec val"id="val-to_string"><ahref="#val-to_string"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>to_string : f:(<spanclass="type-var">'a</span><spanclass="keyword">‑></span> string) <spanclass="keyword">‑></span><ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span><spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>turn a "to_string" function into a "pp_foo"</p></div></div><divclass="spec val"id="val-current_time"><ahref="#val-current_time"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>current_time : <ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span> unit <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Print the current time and date in a format similar to the "date" command</p></div></div><divclass="spec val"id="val-elapsed_time"><ahref="#val-elapsed_time"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>elapsed_time : <ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span> unit <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Print the time in seconds elapsed since the beginning of the execution of the current command.</p></div></div><divclass="spec val"id="val-pair"><ahref="#val-pair"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>pair : fst:(<ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span> snd:(<ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'b</span><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span><ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span> (<spanclass="type-var">'a</span><spanclass="keyword"> * </span><spanclass="type-var">'b</span>) <spanclass="keyword">‑></span> unit</code></div><divclass="doc"></div></div><divclass="spec val"id="val-hashtbl"><ahref="#val-hashtbl"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>hashtbl : key:(<ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'a</span><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span> value:(<ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span><spanclass="type-var">'b</span><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span><ahref="index.html#module-F">F</a>.formatter <spanclass="keyword">‑></span> (<spanclass="type-var">'a</span>,<spanclass="type-var">'b</span>)<ahref="../InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Hashtbl.t <spanclass="keyword">‑></span> unit</code></div><divclass="doc"></div></div></body></html>