Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
57b1d54a
Commit
57b1d54a
authored
Jan 14, 2012
by
Ian Lynagh
Browse files
Document the Num superclass divergence from H98/H2010
parent
804108f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/users_guide/bugs.xml
View file @
57b1d54a
...
...
@@ -149,6 +149,39 @@ main = do args <- getArgs
<title>
Numbers, basic types, and built-in classes
</title>
<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
—
not checked:
</term>
<listitem>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment