[web-devel] Type-safe URL handling

Michael Snoyman michael at snoyman.com
Mon Mar 29 09:47:09 EDT 2010


Jeremy,

Awesome work, sorry I haven't been more responsive for the past few days-
I'm afraid that's going to continue for a bit.

We'd been discussing the PathInfo class previously; I understand now what
you'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'd hate to introduce
a parsec dependency, especially given the 2/3 split we're dealing with right
now.

I know it's painful to split this up into even more packages, but we do you
think of adding web-routes-parser?

Also, question about the Site datatype: Did we want the formatLink and
parseLink functions to work on [String] instead of String? I think I see
advantages either way. Also, I'm not sure if I sent this previously, but I
think the defaultPage function is redundant; that should probably be
specified by 'parseLink ""'.

I'll try to get started on porting the Yesod mkResources code over to
web-routes now.

Michael

On Sun, Mar 28, 2010 at 9:03 PM, Jeremy Shaw <jeremy at n-heptane.com> wrote:

> I pushed a big old patch to web-routes. It splits it into sub-packages,
> drops the parameterization of Site over pathInfo, and switches from Failing
> to either.
>
> I need to figure out how to tweak p2u in PathInfo so that it works with
> parsec 2 and 3.
>
> But, it's getting a lot closer to being done. I think some of the naming
> could still be improved.
>
> - jeremy
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/web-devel/attachments/20100329/cdb0ce1b/attachment-0001.html


More information about the web-devel mailing list