Commit ffd7da35 authored by ian@well-typed.com's avatar ian@well-typed.com

Document the Negative Literals extension

parent ef739635
......@@ -440,6 +440,21 @@ Indeed, the bindings can even be recursive.
</para>
</sect2>
<sect2 id="negative-literals">
<title>Negative Literals</title>
<para>
The literal <literal>-123</literal> is, according to
Haskell98 and Haskell 2010, desugared as
<literal>negate (fromInteger 123)</literal>.
</para>
<para>
The language extension <option>-XNegativeLiterals</option>
means that it is instead desugared as
<literal>fromInteger (-123)</literal>.
</para>
</sect2>
<!-- ====================== HIERARCHICAL MODULES ======================= -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment