My solution, by the way was to change fromURL to have a type more like:<div><br></div><div> fromURL :: [String] -&gt; (Failing a, [String])</div><div><br></div><div>so that it returns the unconsumed portion of the path segments.</div>
<div><br></div><div>If you get the latest urlt from darcs:</div><div><br></div><div>darcs get <a href="http://src.seereason.com/urlt/">http://src.seereason.com/urlt/</a></div><div><br></div><div>I have ported the regular stuff over already. Someone needs to add the missing instance for :*:.</div>
<div><br></div><div>In that code I am using the Consumer monad, which is just a wrapped up version of ([c] -&gt; (a, [c])).</div><div><br></div><div>The URLT library as a whole does not build at the moment, but he parts needed to fix URLT.Regular do.</div>
<div><br></div><div>- jeremy</div><div><br><div class="gmail_quote">On Tue, Mar 23, 2010 at 2:36 PM, Jeremy Shaw <span dir="ltr">&lt;<a href="mailto:jeremy@n-heptane.com">jeremy@n-heptane.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
What happens if you have,<div><br></div><div>data UserRoute = Find Int Int</div><div><br></div><div>you need a instance:</div><div><br></div><div>instance (GToURL f, GToURL g) =&gt; GToURL (f :*: g)</div><div><br></div><div>

I think?</div><div><br></div><div>But the fromURL / gfromURL functions do not have a way to indicate how much of the input they consumed -- which I think will be a problem?</div><div><br></div><div>I believe the current code works because it assumes that each call to gfromURL will consume all the remaining input. But when your constructor has two arguments, the first one better not consume all the rest of the input..</div>

<div><br></div><font color="#888888"><div>- jeremy</div></font><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Tue, Mar 16, 2010 at 3:52 AM, Chris Eidhof <span dir="ltr">&lt;<a href="mailto:chris@eidhof.nl" target="_blank">chris@eidhof.nl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey everyone,<br>
<br>
I just wrote down some of my ideas about type-safe URL handling on github, it&#39;s at <a href="http://gist.github.com/333769" target="_blank">http://gist.github.com/333769</a><br>
<br>
I think it&#39;s similar to what Jeremy is doing with his urlt package [1].<br>
<br>
-chris<br>
<br>
[1]: <a href="http://src.seereason.com/~jeremy/SimpleSite1.html" target="_blank">http://src.seereason.com/~jeremy/SimpleSite1.html</a><br>
<br>
_______________________________________________<br>
web-devel mailing list<br>
<a href="mailto:web-devel@haskell.org" target="_blank">web-devel@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>