[project @ 2002-05-15 08:59:58 by chak]
[ghc-hetmet.git] / ghc / docs / users_guide / vs_haskell.sgml
index e7e922a..87c6b9c 100644 (file)
@@ -10,7 +10,7 @@
   go wrong&rdquo; section (<XRef LinkEnd="wrong">) for information
   about crashes, space leaks, and other undesirable phenomena.</para>
 
-  <para>The limitations here are listed in Haskell-Report order
+  <para>The limitations here are listed in Haskell Report order
   (roughly).</para>
 
   <sect2 id="haskell98-divergence">
          single qualified operator rather than the two lexemes
          <literal>M</literal> and <literal>.\</literal>.</para>
        </listitem>
+
+       <listitem>
+         <para>When <option>-fglasgow-exts</option> is on, GHC
+         reserves several keywords beginning with two underscores.
+         This is due to the fact that GHC uses the same lexical
+         analyser for interface file parsing as it does for source
+         file parsing, and these keywords are used in interface
+         files.  Do not use any identifiers beginning with a double
+         underscore in <option>-fglasgow-exts</option> mode.</para>
+       </listitem>
       </itemizedlist>
     </sect3>
       
             standard namespace.  All of these modules begin with
             <literal>Prel</literal>, so the rule is: don't use any
             modules beginning with <literal>Prel</literal> in your
-            program, or you will be comprehensively screwed.</para>
+            program, or you may be comprehensively screwed.</para>
          </listitem>
        </varlistentry>
       </variablelist>
@@ -210,6 +220,15 @@ main = print (array (1,1) [(1,2), (1,3)])</programlisting>
          arithmetic).  This behaviour was chosen so that for example
          writing <literal>0xffffffff :: Int</literal> preserves the
          bit-pattern in the resulting <literal>Int</literal>.</para>
+
+         <para>The <literal>fromIntegral</literal> function also
+         preserves bit-patterns when converting between the sized
+         integral types (<literal>Int8</literal>,
+         <literal>Int16</literal>, <literal>Int32</literal>,
+         <literal>Int64</literal> and the unsigned
+         <literal>Word</literal> variants), see <xref
+         linkend="sec-Int"> and <xref linkend="sec-Word">.</para>
+
        </listitem>
       </varlistentry>