On Mon, Mar 29, 2010 at 11:28 AM, Chris Eidhof <span dir="ltr">&lt;<a href="mailto:chris@eidhof.nl">chris@eidhof.nl</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
-chris<br>
<div class="im"><br>
On 29 mrt 2010, at 18:18, Jeremy Shaw wrote:<br>
<br>
&gt; On Mon, Mar 29, 2010 at 8:47 AM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>
&gt; Jeremy,<br>
&gt;<br>
&gt; We&#39;d been discussing the PathInfo class previously; I understand now what you&#39;re trying to achieve with it, but I think for a lot of use cases using a parser like that will be unnecesary. For those cases, I&#39;d hate to introduce a parsec dependency, especially given the 2/3 split we&#39;re dealing with right now.<br>

&gt;<br>
&gt; Well, parsec is in the haskell platform, so it&#39;s really a question of can be it implemented so that it works with both 2 and 3.<br>
<br>
</div>I&#39;m on the latest 6.12 platform, and I only have parsec-2.1 installed. Which packages use parsec-3?<br>
<div class="im"><br></div></blockquote><div>in web-routes, the PathInfo module now contains a function p2u ::  Parser a -&gt; URLParser a so that you can lift a Char parser to be a URL parser:</div><div><br></div><div><div>
testp :: URLParser (Char, String, String)</div><div>testp =  </div><div>  do segment &quot;foo&quot;</div><div>     st &lt;- p2u (char &#39;h&#39; &gt;&gt; char &#39;o&#39;)</div><div>     sg &lt;- anySegment</div><div>     sg&#39; &lt;- anySegment</div>
<div>     return (st,sg, sg&#39;)</div><div><br></div><div>but I have not figured out how to implement p2u so that it works under parsec 2 &amp; 3. Maybe I&#39;ll just leave it out for now, but I am doing some exploration first.</div>
</div><div><br></div><div>- jeremy</div></div>