-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update pretty_expressive doc to 0.3.
- Loading branch information
Showing
26 changed files
with
1,302 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
pretty_expressive/Pretty_expressive/Printer/Make/argument-1-C/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>C (pretty_expressive.Pretty_expressive.Printer.Make.C)</title><link rel="stylesheet" href="../../../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">pretty_expressive</a> » <a href="../../../index.html">Pretty_expressive</a> » <a href="../../index.html">Printer</a> » <a href="../index.html">Make</a> » C</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.C</span></code></h1><p>The cost factory interface.</p><p>A valid cost factory should also satisfy the following contracts.</p><ul><li><code>le</code> is a total ordering.</li><li>If <code>le a b</code> and <code>le c d</code> then <code>le (combine a c) (combine b d)</code></li><li>If <code>a</code> <= <code>b</code>, then <code>le (text a l) (text b l)</code></li><li>If <code>a</code> <= <code>b</code>, then <code>le (newline a) (newline b)</code></li><li><code>text c (a + b) = combine (text c a) (text (c + a) b)</code></li><li><code>combine</code> is associative and has the identity equal to <code>text 0 0</code></li><li><code>text c 0</code> = <code>text 0 0</code> for any <code>c</code></li></ul><p>See <a href="../../index.html#val-default_cost_factory"><code>default_cost_factory</code></a>, <a href="../../../../index.html#factory">the cost factory section</a>, and <a href="https://dl.acm.org/doi/abs/10.1145/3622837">the paper</a> for examples of cost factories.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>A type for cost</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-text"><a href="#val-text" class="anchor"></a><code><span><span class="keyword">val</span> text : <span>int <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>text c l</code> calculates a cost for a text placement at column position <code>c</code> with length <code>l</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-newline"><a href="#val-newline" class="anchor"></a><code><span><span class="keyword">val</span> newline : <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>newline i</code> calculates a cost for a newline and indentation at level <code>i</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-combine"><a href="#val-combine" class="anchor"></a><code><span><span class="keyword">val</span> combine : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>combine x y</code> combines the costs <code>x</code> and <code>y</code> together</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-le"><a href="#val-le" class="anchor"></a><code><span><span class="keyword">val</span> le : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p><code>le x y</code> tests if the cost <code>x</code> is less than or equal to the cost <code>y</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-limit"><a href="#val-limit" class="anchor"></a><code><span><span class="keyword">val</span> limit : int</span></code></div><div class="spec-doc"><p><code>limit</code> is <a href="../../../../index.html#complimit">the computation width limit</a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-debug"><a href="#val-debug" class="anchor"></a><code><span><span class="keyword">val</span> debug : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> string</span></code></div><div class="spec-doc"><p><code>debug c</code> produces a string representation of a cost <code>c</code></p></div></div></div></body></html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>C (pretty_expressive.Pretty_expressive.Printer.Make.C)</title><link rel="stylesheet" href="../../../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">pretty_expressive</a> » <a href="../../../index.html">Pretty_expressive</a> » <a href="../../index.html">Printer</a> » <a href="../index.html">Make</a> » C</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.C</span></code></h1><p>The cost factory interface.</p><p>A valid cost factory should also satisfy the following contracts.</p><ul><li><code>le</code> is a total ordering.</li><li>If <code>le a b</code> and <code>le c d</code> then <code>le (combine a c) (combine b d)</code></li><li>If <code>a</code> <= <code>b</code>, then <code>le (text a l) (text b l)</code></li><li>If <code>a</code> <= <code>b</code>, then <code>le (newline a) (newline b)</code></li><li><code>text c (a + b) = combine (text c a) (text (c + a) b)</code></li><li><code>combine</code> is associative and has the identity equal to <code>text 0 0</code></li><li><code>text c 0</code> = <code>text 0 0</code> for any <code>c</code></li></ul><p>The following contracts are required if <a href="../index.html#val-two_columns" title="Printer.Make.two_columns"><code>two_columns</code></a> is used.</p><ul><li>If <code>a</code> <= <code>b</code>, then <code>le (two_columns_bias a) (two_columns_bias b)</code></li><li>If <code>a</code> <= <code>b</code>, then <code>le (two_columns_overflow a) (two_columns_overflow b)</code></li></ul><p>See <a href="../../index.html#val-default_cost_factory" title="Printer.default_cost_factory"><code>default_cost_factory</code></a>, <a href="../../../../index.html#factory" title="factory">the cost factory section</a>, and <a href="https://dl.acm.org/doi/abs/10.1145/3622837">the paper</a> for examples of cost factories.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>A type for cost</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-text"><a href="#val-text" class="anchor"></a><code><span><span class="keyword">val</span> text : <span>int <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>text c l</code> calculates a cost for a text placement at column position <code>c</code> with length <code>l</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-newline"><a href="#val-newline" class="anchor"></a><code><span><span class="keyword">val</span> newline : <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>newline i</code> calculates a cost for a newline and indentation at level <code>i</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-combine"><a href="#val-combine" class="anchor"></a><code><span><span class="keyword">val</span> combine : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>combine x y</code> combines the costs <code>x</code> and <code>y</code> together</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-le"><a href="#val-le" class="anchor"></a><code><span><span class="keyword">val</span> le : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p><code>le x y</code> tests if the cost <code>x</code> is less than or equal to the cost <code>y</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-two_columns_bias"><a href="#val-two_columns_bias" class="anchor"></a><code><span><span class="keyword">val</span> two_columns_bias : <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>two_columns_bias i</code> is the bias cost, added to each possible column separator so that the leftmost column separator is preferred.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-two_columns_overflow"><a href="#val-two_columns_overflow" class="anchor"></a><code><span><span class="keyword">val</span> two_columns_overflow : <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>two_columns_overflow i</code> is the cost due to exceeding the column separator. Make this cost greater than the usual overflow cost (for exceeding the page width limit) to prefer going over the page width limit instead of going over the column separator.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-limit"><a href="#val-limit" class="anchor"></a><code><span><span class="keyword">val</span> limit : int</span></code></div><div class="spec-doc"><p><code>limit</code> is <a href="../../../../index.html#complimit" title="complimit">the computation width limit</a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-string_of_cost"><a href="#val-string_of_cost" class="anchor"></a><code><span><span class="keyword">val</span> string_of_cost : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> string</span></code></div><div class="spec-doc"><p><code>string_of_cost c</code> produces a string representation of a cost <code>c</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-debug_format"><a href="#val-debug_format" class="anchor"></a><code><span><span class="keyword">val</span> debug_format : <span>string <span class="arrow">-></span></span> <span>bool <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> string</span></code></div><div class="spec-doc"><p><code>debug_format s is_tainted cost</code> produces a debugging string from the output of the core printer.</p></div></div></div></body></html> |
Oops, something went wrong.