You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4 lines
18 KiB
4 lines
18 KiB
5 years ago
|
<!DOCTYPE html>
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferStdlib__Pp (InferStdlib.InferStdlib__Pp)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> — <span class="package">package <a href="../index.html">InferStdlib</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferStdlib__Pp</span></h1></header><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>F = Format</code></div><div class="doc"></div></div><p>Pretty Printing</p><div class="spec type" id="type-color"><a href="#type-color" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>color</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-color.Black" class="anchored"><td class="def constructor"><a href="#type-color.Black" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Black</span></code></td></tr><tr id="type-color.Blue" class="anchored"><td class="def constructor"><a href="#type-color.Blue" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Blue</span></code></td></tr><tr id="type-color.Green" class="anchored"><td class="def constructor"><a href="#type-color.Green" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Green</span></code></td></tr><tr id="type-color.Orange" class="anchored"><td class="def constructor"><a href="#type-color.Orange" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Orange</span></code></td></tr><tr id="type-color.Red" class="anchored"><td class="def constructor"><a href="#type-color.Red" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Red</span></code></td></tr></table><code></code></div><div class="doc"><p>Colors supported in printing</p></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><div class="spec val" id="val-compare_color"><a href="#val-compare_color" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_color : <a href="index.html#type-color">color</a> <span class="keyword">‑></span> <a href="index.html#type-color">color</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div></details></div><div class="spec val" id="val-equal_color"><a href="#val-equal_color" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>equal_color : <a href="index.html#type-color">color</a> <span class="keyword">‑></span> <a href="index.html#type-color">color</a> <span class="keyword">‑></span> bool</code></div><div class="doc"></div></div><div class="spec type" id="type-colormap"><a href="#type-colormap" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>colormap</code><code><span class="keyword"> = </span>Obj.t <span class="keyword">‑></span> <a href="index.html#type-color">color</a></code><code></code></div><div class="doc"><p>map subexpressions (as Obj.t element compared by physical equality) to colors</p></div></div><div class="spec type" id="type-simple_kind"><a href="#type-simple_kind" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>simple_kind</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-simple_kind.SIM_DEFAULT" class="anchored"><td class="def constructor"><a href="#type-simple_kind.SIM_DEFAULT" class="anchor"></a><code><span class="keyword">| </span></code>
|
||
|
Currently only used for a map from (identifier) expressions to the program var containing them</p></div></div><div class="spec val" id="val-colormap_red"><a href="#val-colormap_red" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>colormap_red : <a href="index.html#type-colormap">colormap</a></code></div><div class="doc"><p>red colormap</p></div></div><div class="spec val" id="val-extend_colormap"><a href="#val-extend_colormap" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>extend_colormap : <a href="index.html#type-env">env</a> <span class="keyword">‑></span> Obj.t <span class="keyword">‑></span> <a href="index.html#type-color">color</a> <span class="keyword">‑></span> <a href="index.html#type-env">env</a></code></div><div class="doc"><p>Extend the normal colormap for the given object with the given color</p></div></div><div class="spec val" id="val-text"><a href="#val-text" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>text : <a href="index.html#type-env">env</a></code></div><div class="doc"><p>Default text print environment</p></div></div><div class="spec val" id="val-text_break"><a href="#val-text_break" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>text_break : <a href="index.html#type-env">env</a></code></div><div class="doc"><p>text print environment that allows line breaks</p></div></div><div class="spec val" id="val-html"><a href="#val-html" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>html : <a href="index.html#type-color">color</a> <span class="keyword">‑></span> <a href="index.html#type-env">env</a></code></div><div class="doc"><p>Default html print environment</p></div></div><div class="spec val" id="val-color_string"><a href="#val-color_string" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>color_string : <a href="index.html#type-color">color</a> <span class="keyword">‑></span> string</code></div><div class="doc"><p>string representation of colors</p></div></div><div class="spec val" id="val-option"><a href="#val-option" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>option : (<a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> <span class="keyword">‑></span> unit) <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> option <span class="keyword">‑></span> unit</code></div><div class="doc"></div></div><div class="spec val" id="val-cli_args"><a href="#val-cli_args" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>cli_args : <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> string list <span class="keyword">‑></span> unit</code></div><div class="doc"><p>pretty print command line arguments, expanding argument files to print their contents</p></div></div><div class="spec val" id="val-seq"><a href="#val-seq" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>seq : ?⁠print_env:<a href="index.html#type-env">env</a> <span class="keyword">‑></span> ?⁠sep:string <span class="keyword">‑></span> ?⁠sep_html:string <span class="keyword">‑></span> (<a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> <span class="keyword">‑></span> unit) <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> list <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Pretty print a sequence with <code class="code">sep</code> followed by a space between each element. By default,
|
||
|
<code class="code">print_env</code> is <code class="code">text</code>, <code class="code">sep</code> is "", and <code class="code">sep_html</code> set to <code class="code">sep</code>.</p></div></div><div class="spec val" id="val-comma_seq"><a href="#val-comma_seq" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>comma_seq : ?⁠print_env:<a href="index.html#type-env">env</a> <span class="keyword">‑></span> (<a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> <span class="keyword">‑></span> unit) <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> list <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Pretty print a comma-separated sequence.</p></div></div><div class="spec val" id="val-semicolon_seq"><a href="#val-semicolon_seq" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>semicolon_seq : ?⁠print_env:<a href="index.html#type-env">env</a> <span class="keyword">‑></span> (<a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> <span class="keyword">‑></span> unit) <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> list <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Pretty print a ;-separated sequence</p></div></div><div class="spec val" id="val-to_string"><a href="#val-to_string" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>to_string : f:(<span class="type-var">'a</span> <span class="keyword">‑></span> string) <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>turn a "to_string" function into a "pp_foo"</p></div></div><div class="spec val" id="val-current_time"><a href="#val-current_time" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>current_time : <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> unit <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Print the current time and date in a format similar to the "date" command</p></div></div><div class="spec val" id="val-elapsed_time"><a href="#val-elapsed_time" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>elapsed_time : <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> unit <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Print the time in seconds elapsed since the beginning of the execution of the current command.</p></div></div><div class="spec val" id="val-pair"><a href="#val-pair" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pair : fst:(<a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> <span class="keyword">‑></span> unit) <span class="keyword">‑></span> snd:(<a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'b</span> <span class="keyword">‑></span> unit) <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> (<span class="type-var">'a</span><span class="keyword"> * </span><span class="type-var">'b</span>) <span class="keyword">‑></span> unit</code></div><div class="doc"></div></div><div class="spec val" id="val-hashtbl"><a href="#val-hashtbl" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hashtbl : k
|