[Haskell-cafe] Polymorphic Type Safe URL building -- I need advice on my project

Kyle Hanson hanooter at gmail.com
Sat Nov 17 04:20:18 CET 2012


So I started working on a project involving polymorphic type safe urls. I
know there are other type-safe url's out there, but I want some advice
before I start reorganizing it.

It is located here: https://github.com/dracule/web-scatter

One might ask why you would want polymorphic types in your URL. Current
implementation of type-safe URLs use a single type and then have it pattern
match on the constructors.

However, It is a pretty common occurrence that you might want to use a type
from other parts of code. Where this becomes prevalent is in IxSet and
AcidState. For IxSet your Index keys all have to have separate types . So
with this, you can convert your url into your index key's type and then
just make your handler like this:

  myHandler :: BlogId -> SomeWebHandler

I know my code probably has some terrible inefficiencies or something, so I
am looking for some feedback on some jarring problems.

Thank You
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121117/fa253727/attachment.htm>

More information about the Haskell-Cafe mailing list