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>IStdlib__Pp (infer.IStdlib__Pp)</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>» IStdlib__Pp</nav><h1>Module <code>IStdlib__Pp</code></h1></header><divclass="spec module"id="module-F"><ahref="#module-F"class="anchor"></a><code><spanclass="keyword">module</span> F = Stdlib.Format</code></div><aside><p>Pretty Printing</p></aside><dl><dtclass="spec type"id="type-color"><ahref="#type-color"class="anchor"></a><code><spanclass="keyword">type</span> color</code><code> = </code><tableclass="variant"><trid="type-color.Black"class="anchored"><tdclass="def constructor"><ahref="#type-color.Black"class="anchor"></a><code>| </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>| </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>| </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>| </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>| </code><code><spanclass="constructor">Red</span></code></td></tr></table></dt><dd><p>Colors supported in printing</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_color"><ahref="#val-compare_color"class="anchor"></a><code><spanclass="keyword">val</span> compare_color : <ahref="index.html#type-color">color</a><span>-></span><ahref="index.html#type-color">color</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal_color"><ahref="#val-equal_color"class="anchor"></a><code><spanclass="keyword">val</span> equal_color : <ahref="index.html#type-color">color</a><span>-></span><ahref="index.html#type-color">color</a><span>-></span> bool</code></dt></dl><dl><dtclass="spec type"id="type-colormap"><ahref="#type-colormap"class="anchor"></a><code><spanclass="keyword">type</span> colormap</code><code> = Stdlib.Obj.t <span>-></span><ahref="index.html#type-color">color</a></code></dt><dd><p>map subexpressions (as Obj.t element compared by physical equality) to colors</p></dd></dl><dl><dtclass="spec type"id="type-simple_kind"><ahref="#type-simple_kind"class="anchor"></a><code><spanclass="keyword">type</span> simple_kind</code><code> = </code><tableclass="variant"><trid="type-simple_kind.SIM_DEFAULT"class="anchored"><tdclass="def constructor"><ahref="#type-simple_kind.SIM_DEFAULT"class="anchor"></a><code>| </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>| </code><code><spanclass="constructor">SIM_WITH_TYP</span></code></td></tr></table></dt><dd><p>Kind of simple printing: default or with full types</p></dd></dl><dl><dtclass="spec type"id="type-print_kind"><ahref="#type-print_kind"class="anchor"></a><code><spanclass="keyword">type</span> print_kind</code><code> = </code><tableclass="variant"><trid="type-print_kind.TEXT"class="anchored"><tdclass="def constructor"><ahref="#type-print_kind.TEXT"class="anchor"></a><code>| </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>| </code><code><spanclass="constructor">HTML</span></code></td></tr></table></dt><dd><p>Kind of printing</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_print_kind"><ahref="#val-compare_print_kind"class="anchor"></a><code><spanclass="keyword">val</span> compare_print_kind : <ahref="index.html#type-print_kind">print_kind</a><span>-></span><ahref="index.html#type-print_kind">print_kind</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal_print_kind"><ahref="#val-equal_print_kind"class="anchor"></a><code><spanclass="keyword">val</span> equal_print_kind : <ahref="index.html#type-print_kind">print_kind</a><span>-></span><ahref="index.html#type-print_kind">print_kind</a><span>-></span> bool</code></dt></dl><dl><dtclass="spec type"id="type-env"><ahref="#type-env"class="anchor"></a><code><spanclass="keyword">type</span> env</code><code> = </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 : <span><span>(Stdlib.Obj.t <span>-></span> Stdlib.Obj.t)</span> option</span>;</code></td><tdclass="doc"><p>generic object substitution</p></td></tr></table><code>}</code></dt><dd><p>Print environment threaded through all the printing functions</p></dd></dl><dl><dtclass="spec value"id="val-reset_obj_sub"><ahref="#val-reset_obj_sub"class="anchor"></a><code><spanclass="keyword">val</span> reset_obj_sub : <ahref="index.html#type-env">env</a><span>-></span><ahref="index.html#type-env">env</a></code></dt><dd><p>Reset the object substitution, so that no substitution takes place</p></dd></dl><dl><dtclass="spec value"id="val-set_obj_sub"><ahref="#val-set_obj_sub"class="anchor"></a><code><spanclass="keyword">val</span> set_obj_sub : <ahref="index.html#type-env">env</a><span>-></span><span>(<spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span>)</span><span>-></span><ahref="index.html#type-env">env</a></code></dt><dd><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></dd></dl><dl><dtclass="spec value"id="val-extend_colormap"><ahref="#val-extend_colormap"class="anchor"></a><code><spanclass="keyword">val</span> extend_colormap : <ahref="index.html#type-env">env</a><span>-></span> Stdlib.Obj.t <span>-></span><ahref="index.html#type-color">color</a><span>-></span><ahref="index.html#type-env">env</a></code></dt><dd><p>Extend the normal colormap for the given object with the given color</p></dd></dl><dl><dtclass="spec value"id="val-color_wrapper"><ahref="#val-color_wrapper"class="anchor"></a><code><spanclass="keyword">val</span> color_wrapper : <ahref="index.html#type-env">env</a><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span><span>f:<span>(<ahref="index.html#type-env">env</a><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span></span><span>-></span> unit</code></dt><dtclass="spec value"id="val-text"><ahref="#val-text"class="anchor"></a><code><spanclass="keyword">val</span> text : <ahref="index.html#type-env">env</a></code></dt><dd><p>Default text print environment</p></dd></dl><dl><dtclass="spec value"id="val-text_break"><ahref="#val-text_break"class="anchor"></a><code><spanclass="keyword">val</span> text_break : <ahref="index.html#type-env">env</a></code></dt><dd><p>text print environment that allows line breaks</p></dd></dl><dl><dtclass="spec value"id="val-html"><ahref="#val-html"class="anchor"></a><code><spanclass="keyword">val</span> html : <ahref="index.html#type-color">color</a><span>-></span><ahref="index.html#type-env">env</a></code></dt><dd><p>Default html print environment</p></dd></dl><dl><dtclass="spec value"id="val-color_string"><ahref="#val-color_string"class="anchor"></a><code><spanclass="keyword">val</span> color_string : <ahref="index.html#type-color">color</a><span>-></span> string</code></dt><dd><p>string representation of colors</p></dd></dl><dl><dtclass="spec value"id="val-html_with_color"><ahref="#val-html_with_color"class="anchor"></a><code><spanclass="keyword">val</span> html_with_color : <ahref="index.html#type-color">color</a><span>-></span><span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit</code></dt><dtclass="spec value"id="val-option"><ahref="#val-option"class="anchor"></a><code><spanclass="keyword">val</span> option : <span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><span><spanclass="type-var">'a</span> option</span><span>-></span> unit</code></dt><dtclass="spec value"id="val-cli_args"><ahref="#val-cli_args"class="anchor"></a><code><spanclass="keyword">val</span> cli_args : <ahref="index.html#module-F">F</a>.formatter <span>-></span><span>string list</span><span>-></span> unit</code></dt><dd><p>pretty print command line arguments, expanding argument files to print their contents</p></dd></dl><dl><dtclass="spec value"id="val-cli_args_with_verbosity"><ahref="#val-cli_args_with_verbosity"class="anchor"></a><code><spanclass="keyword">val</span> cli_args_with_verbosity : <span>verbose:bool</span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><span>string list</span><span>-></span> unit</code></dt><dd><p>pretty print command line arguments, and expand argument files if <code>verbose</code> is true</p></dd></dl><dl><dtclass="spec value"id="val-seq"><ahref="#val-seq"class="anchor"></a><code><spanclass="keyword">val</span> seq : <span>?⁠print_env:<ahref="index.html#type-env">env</a></span><span>-></span><span>?⁠sep:string</span><span>-></span><span>?⁠sep_html:string</span><span>-></span><span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><span><spanclass="type-var">'a</span> list</span><span>-></span> unit</code></dt><dd><p>Pretty print a sequence with <code>sep</code> followed by a space between each element. By default, <code>print_env</code> is <code>text</code>, <code>sep</code> is "", and <code>sep_html</code> set to <code>sep</code>.</p></dd></dl><dl><dtclass="spec value"id="val-comma_seq"><ahref="#val-comma_seq"class="anchor"></a><code><spanclass="keyword">val</span> comma_seq : <span>?⁠print_env:<ahref="index.html#type-env">env</a></span><span>-></span><span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><span><spanclass="type-var">'a</span> list</span><span>-></span> unit</code></dt><dd><p>Pretty print a comma-separated sequence.</p></dd></dl><dl><dtclass="spec value"id="val-comma_seq_diff"><ahref="#val-comma_seq_diff"class="anchor"></a><code><spanclass="keyword">val</span> comma_seq_diff : <span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span><span>-></span><ahref="index.html#type-env">env</a><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><span><spanclass="type-var">'a</span> list</span><span>-></span> unit</code></dt><dtclass="spec value"id="val-semicolon_seq"><ahref="#val-semicolon_seq"class="anchor"></a><code><spanclass="keyword">val</span> semicolon_seq : <span>?⁠print_env:<ahref="index.html#type-env">env</a></span><span>-></span><span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><span><spanclass="type-var">'a</span> list</span><span>-></span> unit</code></dt><dd><p>Pretty print a ;-separated sequence</p></dd></dl><dl><dtclass="spec value"id="val-of_string"><ahref="#val-of_string"class="anchor"></a><code><spanclass="keyword">val</span> of_string : <span>f:<span>(<spanclass="type-var">'a</span><span>-></span> string)</span></span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit</code></dt><dd><p>If all you have is to_string, but you need pp_foo.</p></dd></dl><dl><dtclass="spec value"id="val-string_of_pp"><ahref="#val-string_of_pp"class="anchor"></a><code><spanclass="keyword">val</span> string_of_pp : <span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span><span>-></span><spanclass="type-var">'a</span><span>-></span> string</code></dt><dd><p>If all you have is pp_foo, but you need to_string.</p></dd></dl><dl><dtclass="spec value"id="val-pair"><ahref="#val-pair"class="anchor"></a><code><spanclass="keyword">val</span> pair : <span>fst:<span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span></span><span>-></span><span>snd:<span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'b</span><span>-></span> unit)</span></span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><span>(<spanclass="type-var">'a</span> * <spanclass="type-var">'b</span>)</span><span>-></span> unit</code></dt><dtclass="spec value"id="val-in_backticks"><ahref="#val-in_backticks"class="anchor"></a><code><spanclass="keyword">val</span> in_backticks : <span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit)</span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'a</span><span>-></span> unit</code></dt><dtclass="spec value"id="val-collection"><ahref="#val-collection"class="anchor"></a><code><spanclass="keyword">val</span> collection : <span>fold:<span><span>(<spanclass="type-var">'t</span>,<spanclass="type-var">'item</span>,bool)</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span><span>-></span><span>sep:string</span><span>-></span><span>pp_item:<span>(<ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'item</span><span>-></span> unit)</span></span><span>-></span><ahref="index.html#module-F">F</a>.formatter <span>-></span><spanclass="type-var">'t</span><span>-></span> unit</code></dt></dl></div></body></html>