<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>RE: [Haskell-cafe] Parsec Expected Type</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Thanks, I'd thought it was something to do with incompatible types. I can now create a simpler problem:<BR>
<BR>
tester2 = reserved &quot;parameter&quot; &lt;|&gt; symbol &quot;:&quot;<BR>
<BR>
Certainly I could use reserved &quot;:&quot; instead of symbol, but where is my thinking with symbol here going wrong? Surely the above example isn't so odd?<BR>
<BR>
Paul<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Luke Palmer [<A HREF="mailto:lrpalmer@gmail.com">mailto:lrpalmer@gmail.com</A>]<BR>
Sent: Fri 3/28/2008 12:26 AM<BR>
To: Paul Keir<BR>
Cc: haskell-cafe@haskell.org<BR>
Subject: Re: [Haskell-cafe] Parsec Expected Type<BR>
<BR>
Hi Paul,<BR>
<BR>
2008/3/27 Paul Keir &lt;pkeir@dcs.gla.ac.uk&gt;:<BR>
&gt; Hi,<BR>
&gt;<BR>
&gt;&nbsp; Does anyone know why this reduced Parsec production stops compilation, and<BR>
&gt; how I can fix it?<BR>
&gt;<BR>
&gt;&nbsp; tester = reserved &quot;parameter&quot;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;|&gt; do { reserved &quot;dimension&quot;; symbol &quot;:&quot; }<BR>
<BR>
Look at the types of &quot;reserved&quot; and &quot;symbol&quot; (from<BR>
http://www.haskell.org/ghc/docs/latest/html/libraries/parsec/Text-ParserCombinators-Parsec-Token.html):<BR>
<BR>
&nbsp; symbol :: String -&gt; CharParser st String<BR>
&nbsp; reserved :: String -&gt; CharParser st ()<BR>
<BR>
The type of a do block is the same as the type of its last statement.<BR>
But (reserved &quot;parameter&quot;) and (symbol &quot;;&quot;) do not have the same type.<BR>
<BR>
Luke<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>