[project @ 2004-08-09 12:35:02 by simonmar]
[ghc-hetmet.git] / ghc / docs / users_guide / glasgow_exts.sgml
index 1c42f5d..5c72af7 100644 (file)
@@ -505,7 +505,7 @@ import qualified Control.Monad.ST.Strict as ST
 
 <para>
 <indexterm><primary>Pattern guards (Glasgow extension)</primary></indexterm>
-The discussion that follows is an abbreviated version of Simon Peyton Jones's original <ulink URL="http://research.microsoft.com/~simonpj/Haskell/guards.html">proposal</ulink>. (Note that the proposal was written before pattern guards were implemented, so refers to them as unimplemented.)
+The discussion that follows is an abbreviated version of Simon Peyton Jones's original <ulink url="http://research.microsoft.com/~simonpj/Haskell/guards.html">proposal</ulink>. (Note that the proposal was written before pattern guards were implemented, so refers to them as unimplemented.)
 </para>
 
 <para>
@@ -1353,7 +1353,7 @@ declarations.  Define your own instances!
 <para>
 This section documents GHC's implementation of multi-parameter type
 classes.  There's lots of background in the paper <ulink
-URL="http://research.microsoft.com/~simonpj/multi.ps.gz" >Type
+url="http://research.microsoft.com/~simonpj/multi.ps.gz" >Type
 classes: exploring the design space</ulink > (Simon Peyton Jones, Mark
 Jones, Erik Meijer).
 </para>
@@ -2900,12 +2900,18 @@ in lambda abstractions:
  Pattern type signatures, including the result part, can be used
 in <literal>case</literal> expressions:
 
-
 <programlisting>
-  case e of { (x::a, y) :: a -> x }
+  case e of { ((x::a, y) :: (a,b)) -> x }
 </programlisting>
 
+Note that the <literal>-&gt;</literal> symbol in a case alternative
+leads to difficulties when parsing a type signature in the pattern: in
+the absence of the extra parentheses in the example above, the parser
+would try to interpret the <literal>-&gt;</literal> as a function
+arrow and give a parse error later.
+
 </para>
+
 </listitem>
 
 <listitem>