While you&#39;re hacking around on parsec a nice improvement would be to relax the type on the language generators in Text.ParserCombinators.Parsec.Language. (This one could be done without so drastic a change as bumping from 3 to 4):<div>
<br></div><div>They can all be instantiated for Monad m =&gt; GenLanguageDef String s m instead of LanguageDef, this would greatly extend their usability.</div><div><br></div><div>You could even go a little farther and relax them so they can work over Bytestrings, etc.</div>
<div><br></div><div>I for one always feel a little twinge when I&#39;m forced to copy and paste them and change the signature just because I&#39;m working in a parser that provides state, uses _any_ base monad, or consumes some other Char source.</div>
<div><br></div><div>-Edward Kmett<br><div><div><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 8:57 AM, Christian Maeder <span dir="ltr">&lt;<a href="mailto:Christian.Maeder@dfki.de">Christian.Maeder@dfki.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Am 27.01.2011 07:16, schrieb Kazu Yamamoto (山本和彦):<br>
</div><div class="im">&gt; Hello,<br>
&gt;<br>
&gt; I&#39;m using parsec3 with the applicative style. Since the functions in<br>
&gt; Control.Applicative and parsec3 conflicts, I need to use the &quot;hiding&quot;<br>
&gt; keyword as follows:<br>
&gt;<br>
&gt;       import Control.Applicative hiding (many,optional,(&lt;|&gt;))<br>
&gt;       import Text.Parsec<br>
&gt;<br>
&gt; This is inconvenient for me. I would like to use them as follows:<br>
&gt;<br>
&gt;       import Control.Applicative<br>
&gt;       import Text.Parsec<br>
&gt;<br>
&gt; Christian, the maintainer of parsec3, told me that it is possible to<br>
&gt; use the functions of Control.Applicative in parsec3 instead of<br>
&gt; implementing its own functions. But (&lt;|&gt;) of parsec3 is &quot;infixr 1&quot;<br>
&gt; while that of Control.Applicative is &quot;infixl 3&quot;.  This may be an<br>
&gt; issue.<br>
&gt;<br>
&gt; Any ideas to solve this issue?<br>
<br>
</div>If parsec is not changed I could create a parsec4 package where the<br>
conflicting functions are removed from Text.Parsec.<br>
<br>
This will break code that uses &quot;optional&quot; from Text.Parsec. Is there a<br>
need for a renaming of Text.Parsec.Combinator.optional, like &quot;voidOptional&quot;?<br>
<br>
Such a function would be better placed inside Control.Applicative though:<br>
<br>
 voidOptional v = const () &lt;$&gt; v &lt;|&gt; pure ()<br>
<br>
or<br>
<br>
 voidOptional = void . optional<br>
<br>
<br>
using the new Control.Monad.void.<br>
<font color="#888888"><br>
C.<br>
</font><div><div></div><div class="h5"><br>
&gt;<br>
&gt; --Kazu<br>
<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div></div></div>