Hello,

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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to