[web-devel] web-routes-quasi gotcha

Nubis nubis at woobiz.com.ar
Thu Jan 20 18:12:38 CET 2011


Hi guys,
I was just investigating an issue in my yesod app that prevented me from
running the devel-server.
It was a warning about route patterns overlapping

S4M/Server/Controller.hs:33:0:
    Warning: Pattern match(es) are overlapped
             In the definition of `parse[awnQ]':
                 parse[awnQ] : "con" : "f" [] = ...
                 parse[awnQ] : "con" : "h" [] = ...
                 parse[awnQ] : "con" : "m" : "list" [] = ...
                 parse[awnQ] : "con" : "m" : "c" [] = ...


The issue seems to come up when part of the route is a single character (in
this case, f, h and m)
like
/con/f/
/con/h/
/con/m/list/

I ended up just changing my routes to be more 'expressive' which is fine by
me.

Haven't looked at the source of the issue yet, I can reproduce it on 0.6.2
but haven't tried 0.6.3 so I apologize in advance if it is already fixed :)

Just wanted to get it out here so I don't forget to look into it later (I'm
heading home now)

Cheers!
----nubis :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110120/90a38206/attachment.htm>


More information about the web-devel mailing list