[Haskell-cafe] Polymorphic Type Safe URL building -- I need advice on my project
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe