Commits

Anonymous committed 4d99e54

Started creating MongoDB backend for Auth

Comments (0)

Files changed (2)

src/Snap/Snaplet/Auth/Backends/MongoDB.hs

+
+module Snap.Snaplet.Auth.Backends.MongoDB where
+

src/Snap/Snaplet/MongoDB.hs

 ------------------------------------------------------------------------------
 -- |
 class HasMongoDBState s where
-    getMongoDBState :: Handler s s MongoDBSnaplet
-    setMongoDBState :: MongoDBSnaplet -> Handler s s ()
+    getMongoDBState :: Handler a s MongoDBSnaplet
+    setMongoDBState :: MongoDBSnaplet -> Handler a s ()
 
     --modifyMongoDBState :: (MongoDBSnaplet -> MongoDBSnaplet) -> s -> s
     --modifyMongoDBState s = setMongoDBState s getMongoDBState
 
 ------------------------------------------------------------------------------
 -- |
-instance HasMongoDBState s => MonadMongoDB (Handler s s) where
+instance HasMongoDBState s => MonadMongoDB (Handler a s) where
   withDB run = do
     (MongoDBSnaplet pool db) <- getMongoDBState
     epipe <- liftIO $ runErrorT $ MPool.aResource pool