[project @ 2005-03-04 14:24:51 by simonmar]
[ghc-hetmet.git] / ghc / docs / users_guide / bugs.xml
index 6a07c90..f9fc964 100644 (file)
       <sect3 id="infelicities-syntax">
        <title>Context-free syntax</title>
        
-      <itemizedlist>
+       <itemizedlist>
+         <listitem>
+           <para>GHC is a little less strict about the layout rule when used
+             in <literal>do</literal> expressions.  Specifically, the
+             restriction that "a nested context must be indented further to
+             the right than the enclosing context" is relaxed to allow the
+             nested context to be at the same level as the enclosing context,
+             if the enclosing context is a <literal>do</literal>
+             expression.</para>
+
+           <para>For example, the following code is accepted by GHC:
+
+<programlisting>
+main = do args &lt;- getArgs
+         if null args then return [] else do
+          ps &lt;- mapM process args
+          mapM print ps</programlisting>
+
+             </para>
+         </listitem>
+
        <listitem>
          <para>GHC doesn't do fixity resolution in expressions during
          parsing.  For example, according to the Haskell report, the
@@ -145,6 +165,21 @@ checking for duplicates.  The reason for this is efficiency, pure and simple.
                octal escapes, so it seems inconsistent not to do so for integers too.</para>
            </listitem>
          </varlistentry>
+
+         <varlistentry>
+           <term><literal>isAlpha</literal></term>
+           <listitem>
+             <para>The Haskell 98 definition of <literal>isAlpha</literal>
+              is:</para>
+
+<programlisting>isAlpha c = isUpper c || isLower c</programlisting>
+
+             <para>GHC's implementation diverges from the Haskell 98
+              definition in the sense that Unicode alphabetic characters which
+              are neither upper nor lower case will still be identified as
+              alphabetic by <literal>isAlpha</literal>.</para>
+           </listitem>
+         </varlistentry>
        </variablelist>
     </sect3>
   </sect2>
@@ -356,6 +391,6 @@ Loading package javavm ... linking ... WARNING: Overflown relocation field (# re
 <!-- Emacs stuff:
      ;;; Local Variables: ***
      ;;; mode: xml ***
-     ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter" "sect1") ***
+     ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***
      ;;; End: ***
  -->