Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (13 sloc) 584 Bytes
<h3>Record Labels Exhaustiveness</h3>
<p>You can now verify the exhaustiveness of pattern-matchings on
records, when the <code>R</code>(or <code>9</code>) warning is activated.</p>
<p>Let's activate this warning with the default ones:</p>
<p><code>#warnings "+a-4-6-7-27..29"</code></p>
<br />
<p>We can now implement a function that does not use all the labels
and see what happens:<p>
<p><code>let abs { x } = x</code></p>
<br />
<p>To avoid the warning, we must tell the compiler that we are aware that
some labels are missing:</p>
<p><code>let abs { x; _ } = x</code></p>
Jump to Line
Something went wrong with that request. Please try again.