[web-devel] Type-safe URL handling
michael at snoyman.com
Fri Mar 19 17:22:15 EDT 2010
As an example of both a unified URL creation framework and persistence
framework, I've put together a little example of how we could create an
"authentication plugin." For the purposes of our discussion here, we could
ignore the persistence piece for now, though I would like to eventually
discuss how we could make that better.
I wrote a small blog post describing the system. The code relevant for
our discussion is broken into two files: WebPlug.hs defines the interface
and auth-example.hs is the actual example.
In this version of WebPlug.hs, I've included WebPlug as a datatype instead
of a typeclass. I don't actually *use* that datatype here, but I think it
would be very useful for higher-level utilities like the quasi-quoter to be
able to access the three related functions together.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the web-devel