snapframework/snap — pull request #17 by veinor (2011-10-19 20:10:24+00:00)
Title: Use existential types to run AuthManager handlers with the auth backend

Instead of pattern-matching against the AuthManager ctor, we can use a `withBackend :: (forall r. (IAuthBackend r) => r -> Handler b (AuthManager v) a) -> Handler b (AuthManager v) a`. The handlers in Snap.Snaplet.Auth.Handlers have been rewritten to use this.

This also adds a usernameExists function.