
Hello, chaps. I thought that it would be an interesting idea to generate URLs from plain old Haskell record data types using Data.Data/Typeable. Repo: https://github.com/chrisdone/url-generic Docs: http://hackage.haskell.org/packages/archive/url-generic/0.1/doc/html/Web-URL... Seems like a success. Whether it's a good idea I'm still considering. Good points: * Works with standard data types. * Derives automatically and therefore predictably. * Disallows conflicts between URL representations (e.g. can't accidentally make up /1234 for "event 1234" and /1234 for "blog post 1234") * The data type, being simple, can therefore be nicely pattern-matched upon, something I use extensively is record wildcarding. * Ordering of parameters doesn't matter. * Fields of type Maybe a can be optionally provided or not. * Enum data types "just work", nice for providing choice in URLs. Bad points: * Sometimes you want custom URLs like "/1234" for convenience. * Not sure how this would interact with web-routes and those type of packages because they use only *one* type for *all* URLs. Let me know your thoughts. Ciao!