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
4.5 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Const (infer.IR.Const)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">IR</a> &#x00BB; Const</nav><h1>Module <code>IR.Const</code></h1></header><aside><p>The Smallfoot Intermediate Language: Constants</p></aside><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><code><span class="keyword">module</span> F = Stdlib.Format</code></div><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><table class="variant"><tr id="type-t.Cint" class="anchored"><td class="def constructor"><a href="#type-t.Cint" class="anchor"></a><code>| </code><code><span class="constructor">Cint</span> <span class="keyword">of</span> <a href="../IntLit/index.html#type-t">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>| </code><code><span class="constructor">Cfun</span> <span class="keyword">of</span> <a href="../Procname/index.html#type-t">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>| </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>| </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>| </code><code><span class="constructor">Cclass</span> <span class="keyword">of</span> <a href="../Ident/index.html#type-name">Ident.name</a></code></td><td class="doc"><p>class constant</p></td></tr></table></dt><dd><p>Constants</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-kind_equal"><a href="#val-kind_equal" class="anchor"></a><code><span class="keyword">val</span> kind_equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Return true if the constants have the same kind (both integers, ...)</p></dd></dl><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : <a href="../../IStdlib/Pp/index.html#type-env">IStdlib.Pp.env</a> <span>&#45;&gt;</span> <a href="index.html#module-F">F</a>.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Pretty print a const</p></dd></dl><dl><dt class="spec value" id="val-iszero_int_float"><a href="#val-iszero_int_float" class="anchor"></a><code><span class="keyword">val</span> iszero_int_float : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec valu