<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>INPUT (reparse.Reparse.INPUT)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.0.0-beta4"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../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">reparse</a> &#x00BB; <a href="../index.html">Reparse</a> &#x00BB; INPUT</nav><header class="odoc-preamble"><h1>Module type <code><span>Reparse.INPUT</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type" id="type-t" class="anchored"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Represents the input.</p></div></div><div class="odoc-spec"><div class="spec type" id="type-promise" class="anchored"><a href="#type-promise" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a promise</span></span></code></div><div class="spec-doc"><p>Represents an input promise.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-return" class="anchored"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <a href="#type-promise">promise</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-bind" class="anchored"><a href="#val-bind" class="anchor"></a><code><span><span class="keyword">val</span> bind : <span><span>(<span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'b</span> <a href="#type-promise">promise</a></span>)</span> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> <a href="#type-promise">promise</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'b</span> <a href="#type-promise">promise</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-commit" class="anchored"><a href="#val-commit" class="anchor"></a><code><span><span class="keyword">val</span> commit : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>pos:int <span class="arrow">&#45;&gt;</span></span> <span>unit <a href="#type-promise">promise</a></span></span></code></div><div class="spec-doc"><p><code>commit t ~pos</code> ensures that the parser will not backtrack on input <code>t</code> beyond <code>pos</code>.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-get" class="anchored"><a href="#val-get" class="anchor"></a><code><span><span class="keyword">val</span> get : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>pos:int <span class="arrow">&#45;&gt;</span></span> <span>len:int <span class="arrow">&#45;&gt;</span></span> <span><span>[ <span>`Cstruct of <span class="xref-unresolved">Cstruct</span>.t</span> <span>| `Eof</span> ]</span> <a href="#type-promise">promise</a></span></span></code></div><div class="spec-doc"><p><code>get t ~pos ~len</code> returns <code>`String s</code> where <code>String.length s &lt;= len</code> or <code>`Eof</code> if <code>EOI</code> is reached.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-get_unbuffered" class="anchored"><a href="#val-get_unbuffered" class="anchor"></a><code><span><span class="keyword">val</span> get_unbuffered : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>pos:int <span class="arrow">&#45;&gt;</span></span> <span>len:int <span class="arrow">&#45;&gt;</span></span> <span><span>[ <span>`Cstruct of <span class="xref-unresolved">Cstruct</span>.t</span> <span>| `Eof</span> ]</span> <a href="#type-promise">promise</a></span></span></code></div><div class="spec-doc"><p><code>get_unbuffered t ~pos ~len</code> similar to <code>get t ~pos ~len</code> except it doesn't buffer the taken <code>len</code> bytes.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-committed_pos" class="anchored"><a href="#val-committed_pos" class="anchor"></a><code><span><span class="keyword">val</span> committed_pos : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>int <a href="#type-promise">promise</a></span></span></code></div></div></div></body></html>