<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 <- getArgs
+ if null args then return [] else do
+ ps <- 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
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>
<!-- Emacs stuff:
;;; Local Variables: ***
;;; mode: xml ***
- ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter" "sect1") ***
+ ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***
;;; End: ***
-->