[web-devel] ANN: url-generic-0.1: Parse/format generic key/value URLs from record data types.

Vladimir Zlatanov vlado at dikini.net
Mon Jun 20 09:54:12 CEST 2011


Greetings from a lurker

> 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-Generic.html
>
> Seems like a success. Whether it's a good idea I'm still considering.
 [snip]
> Let me know your thoughts.

I like it. Sorry, that is an understatement. Is it a good idea, definitely yes.

A very similar approach for URLs is used in Drupal, sans the automatic
generation of the url schemes. The benefit is the mapping between urls
and type constructors. It makes all kinds of interesting URL
expressions possible. For example having a compound page with several
different posts in it, expressed in the url. This language gives
control to the user to express exactly what content they want combined
and how. This power is often under estimated. The scenarios are too
many to mention.



More information about the web-devel mailing list