summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-01-14 13:40:58 +0000
committerIan Lynagh <igloo@earth.li>2012-01-14 13:46:11 +0000
commit57b1d54a56b406648dd198092419441b990b3ae1 (patch)
tree44db7a9245fc19f8e81285a156268e60d5a9cc51
parent804108f0c0fbc2c5f926e4cb4d30b3891443a079 (diff)
downloadhaskell-57b1d54a56b406648dd198092419441b990b3ae1.tar.gz
Document the Num superclass divergence from H98/H2010
-rw-r--r--docs/users_guide/bugs.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/users_guide/bugs.xml b/docs/users_guide/bugs.xml
index 12ef9460da..9da7927bc9 100644
--- a/docs/users_guide/bugs.xml
+++ b/docs/users_guide/bugs.xml
@@ -150,6 +150,39 @@ main = do args &lt;- getArgs
<variablelist>
<varlistentry>
+ <term>Num superclasses</term>
+ <listitem>
+ <para>
+ The <literal>Num</literal> class does not have
+ <literal>Show</literal> or <literal>Eq</literal>
+ superclasses.
+ </para>
+
+ <para>
+ You can make code that works with both
+ Haskell98/Haskell2010 and GHC by:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Whenever you make a <literal>Num</literal> instance
+ of a type, also make <literal>Show</literal> and
+ <literal>Eq</literal> instances, and
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Whenever you give a function, instance or class a
+ <literal>Num t</literal> constraint, also give it
+ <literal>Show t</literal> and
+ <literal>Eq t</literal> constraints.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>Multiply-defined array elements&mdash;not checked:</term>
<listitem>
<para>This code fragment should