[project @ 2003-03-31 13:08:49 by simonmar]
authorsimonmar <unknown>
Mon, 31 Mar 2003 13:08:49 +0000 (13:08 +0000)
committersimonmar <unknown>
Mon, 31 Mar 2003 13:08:49 +0000 (13:08 +0000)
Mention that our Read class accepts hex and octal literals, as an
extension to Haskell 98.

ghc/docs/users_guide/bugs.sgml

index dc7dee3..c358ffc 100644 (file)
@@ -168,7 +168,7 @@ main = print (array (1,1) [(1,2), (1,3)])</programlisting>
        </varlistentry>
 
        <varlistentry>
-         <term>Arbitrary-sized tuples:</term>
+         <term>Arbitrary-sized tuples</term>
          <listitem>
            <para>Tuples are currently limited to size 61.  HOWEVER:
             standard instances for tuples (<literal>Eq</literal>,
@@ -181,6 +181,18 @@ main = print (array (1,1) [(1,2), (1,3)])</programlisting>
             if you get stuck on it.</para>
            </listitem>
          </varlistentry>
+
+         <varlistentry>
+           <term><literal>Read</literal>ing integers</term>
+           <listitem>
+             <para>GHC's implementation of the
+             <literal>Read</literal> class for integral types accepts
+             hexadeciaml and octal literals (the code in the Haskell
+             98 report doesn't).  So, for example,
+<programlisting>read "0xf00" :: Int</programlisting>
+              works in GHC.</para>
+           </listitem>
+         </varlistentry>
        </variablelist>
     </sect3>
   </sect2>