Kyle Hanson | 17 Nov 04:20 2012

Polymorphic Type Safe URL building -- I need advice on my project


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. 

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
Haskell-Cafe mailing list
Haskell-Cafe <at>