ocaml-trace/ppxlib/Astlib/Location/Error/index.html
2024-03-08 16:51:12 +00:00

2 lines
No EOL
4.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Error (ppxlib.Astlib.Location.Error)</title><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.2"/><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">ppxlib</a> &#x00BB; <a href="../../index.html">Astlib</a> &#x00BB; <a href="../index.html">Location</a> &#x00BB; Error</nav><header class="odoc-preamble"><h1>Module <code><span>Location.Error</span></code></h1></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>The location error type. It contains a located main message and a (possibly empty) list of located submessages.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_well_formed"><a href="#val-is_well_formed" class="anchor"></a><code><span><span class="keyword">val</span> is_well_formed : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>A location error constructed via <code>make</code> is always well-formed. A malformed location error is a value of type <code>location_report</code> on compilers &gt;= 4.08, whose <code>kind</code> is different from <code>Report_error</code>. Notice that <code>location_report</code> does not explicitly form part of Astlib.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-main_msg"><a href="#val-main_msg" class="anchor"></a><code><span><span class="keyword">val</span> main_msg : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>string <a href="../index.html#type-loc">loc</a></span></span></code></div><div class="spec-doc"><p>Get the located error main message.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sub_msgs"><a href="#val-sub_msgs" class="anchor"></a><code><span><span class="keyword">val</span> sub_msgs : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span>string <a href="../index.html#type-loc">loc</a></span> list</span></span></code></div><div class="spec-doc"><p>Get the located error sub-messages.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_main_msg"><a href="#val-set_main_msg" class="anchor"></a><code><span><span class="keyword">val</span> set_main_msg : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Set the text of the error's main message. The location stays as is.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_main_loc"><a href="#val-set_main_loc" class="anchor"></a><code><span><span class="keyword">val</span> set_main_loc : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Set the location of the error's main message. The text satys as is.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make : <span>sub:<span><span>string <a href="../index.html#type-loc">loc</a></span> list</span> <span class="arrow">&#45;&gt;</span></span> <span><span>string <a href="../index.html#type-loc">loc</a></span> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Construct a location error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_exn"><a href="#val-of_exn" class="anchor"></a><code><span><span class="keyword">val</span> of_exn : <span>exn <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> option</span></span></code></div><div class="spec-doc"><p>Turn an exception into a location error, if possible.</p></div></div></div></body></html>