v class="odoc-spec"><div class="spec value" id="val-fail" class="anchored"><a href="#val-fail" class="anchor"></a><code><span><span class="keyword">val</span> fail : <span>string <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>fail err_msg</code> returns a parser that always fails with <code>err_msg</code>.</p><p>Examples</p><pre><code>module P = Reparse.String

;;
let input = new P.string_inp