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.

2 lines
5.5 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferIR__Const (InferIR.InferIR__Const)</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> &mdash; <span class="package">package <a href="../index.html">InferIR</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferIR__Const</span></h1></header><p>The Smallfoot Intermediate Language: Constants</p><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><div class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>t</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-t.Cint" class="anchored"><td class="def constructor"><a href="#type-t.Cint" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Cint</span><span class="keyword"> of </span><a href="../InferIR/IntLit/index.html#type-t">InferIR.IntLit.t</a></code></td><td class="doc"><p>(** integer constants *)</p></td></tr><tr id="type-t.Cfun" class="anchored"><td class="def constructor"><a href="#type-t.Cfun" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Cfun</span><span class="keyword"> of </span><a href="../InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a></code></td><td class="doc"><p>(** function names *)</p></td></tr><tr id="type-t.Cstr" class="anchored"><td class="def constructor"><a href="#type-t.Cstr" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Cstr</span><span class="keyword"> of </span>string</code></td><td class="doc"><p>(** string constants *)</p></td></tr><tr id="type-t.Cfloat" class="anchored"><td class="def constructor"><a href="#type-t.Cfloat" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Cfloat</span><span class="keyword"> of </span>float</code></td><td class="doc"><p>(** float constants *)</p></td></tr><tr id="type-t.Cclass" class="anchored"><td class="def constructor"><a href="#type-t.Cclass" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Cclass</span><span class="keyword"> of </span><a href="../InferIR/Ident/index.html#type-name">InferIR.Ident.name</a></code></td><td class="doc"><p>(** class constant *)</p></td></tr></table><code></code></div><div class="doc"><p>Constants</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"><a href="#val-compare" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> int</code></div><div class="doc"></div></div></details></div><div class="spec val" id="val-equal"><a href="#val-equal" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>equal : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> bool</code></div><div class="doc"></div></div><div class="spec val" id="val-kind_equal"><a href="#val-kind_equal" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>kind_equal : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> bool</code></div><div class="doc"><p>Return true if the constants have the same kind (both integers, ...)</p></div></div><div class="spec val" id="val-pp"><a href="#val-pp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp : <a href="../../InferStdlib/InferStdlib/Pp/index.html#type-env">InferStdlib.Pp.env</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"><p>Pretty print a const</p></div></div><div class="spec val" id="val-iszero_int_float"><a href="#val-iszero_int_float" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>iszero_int_float : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> bool</code></div><div class="doc"></div></div><div class="spec val" id="val-isone_int_float"><a href="#val-isone_int_float" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>isone_int_float : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> bool</code></div><div class="doc"></div></div><div class="spec val" id="val-isminusone_int_float"><a href="#val-isminusone_int_float" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>isminusone_int_float : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> bool</code></div><div class="doc"></div></div></body></html>