Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/0c8acc3997f5c0b841d61f0d32597cc2f2bf66b1

>---------------------------------------------------------------

commit 0c8acc3997f5c0b841d61f0d32597cc2f2bf66b1
Author: Ian Lynagh <[email protected]>
Date:   Sat Jan 14 14:59:40 2012 +0000

    Improve the documentation of the Num superclass changes in the release notes

>---------------------------------------------------------------

 docs/users_guide/7.4.1-notes.xml |   56 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/docs/users_guide/7.4.1-notes.xml b/docs/users_guide/7.4.1-notes.xml
index 3bbe89c..f90847c 100644
--- a/docs/users_guide/7.4.1-notes.xml
+++ b/docs/users_guide/7.4.1-notes.xml
@@ -17,6 +17,40 @@
 
     <itemizedlist>
       <listitem>
+          <para>
+              The <literal>Num</literal> class no longer has
+              <literal>Eq</literal> or <literal>Show</literal>
+              superclasses. A number of other classes and
+              functions have therefore gained explicit
+              <literal>Eq</literal> or <literal>Show</literal>
+              constraints, rather than relying on a
+              <literal>Num</literal> constraint to provide them.
+          </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>
+
+      <listitem>
         <para>
           There is a new feature Safe Haskell
           (<literal>-XSafe</literal>,
@@ -1079,6 +1113,28 @@ Subject: [PATCH 0695/1074] Add an RTS eventlog tracing 
class for user messages
                 constraints, rather than relying on a
                 <literal>Num</literal> constraint to provide them.
             </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>
 
         <listitem>



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to