Skip to content
Browse files

Added note about the (.) from Control.Category to the documentation.

  • Loading branch information...
1 parent af9bcf1 commit 54d6c751d21416a1e70f3e85edfd2b53119767ed @Palmik committed Jan 17, 2012
Showing with 5 additions and 2 deletions.
  1. +1 −1 README.md
  2. +2 −0 src/Snap/Snaplet/MongoDB/Core.hs
  3. +2 −1 src/Snap/Snaplet/MongoDB/Functions.hs
View
2 README.md
@@ -35,7 +35,7 @@ We will follow the common Snap project structure.
import Snap.Snaplet.MongoDB.Core
import Control.Category
- import Prelude hiding ((.))
+ import Prelude hiding ((.)) -- The (.) is used in getMongoDB definition.
data App = App
{ _heist :: Snaplet (Heist App)
View
2 src/Snap/Snaplet/MongoDB/Core.hs
@@ -29,6 +29,8 @@ data MongoDB = MongoDB
-- instance HasMongoDB App where
-- getMongoDB = getL (snapletValue . database)
-- @
+--
+-- Note: The (.) is from Control.Category.
class HasMongoDB app where
getMongoDB :: app -> MongoDB
View
3 src/Snap/Snaplet/MongoDB/Functions.hs
@@ -37,8 +37,9 @@ description = "Minimalistic MongoDB Snaplet."
-- @
-- app :: SnapletInit App App
-- app = makeSnaplet "app" "An snaplet example application." Nothing $ do
+-- h <- nestSnaplet "heist" heist $ heistInit "resources/templates"
-- d <- nestSnaplet "database" database $ mongoDBInit 10 (host "127.0.0.1") "Snaplet-MongoDB"
--- return $ App d
+-- return $ App h d
-- @
mongoDBInit :: Int -> Host -> Database -> SnapletInit app MongoDB
mongoDBInit n h d = makeSnaplet "snaplet-mongodb" description Nothing $ do

0 comments on commit 54d6c75

Please sign in to comment.
Something went wrong with that request. Please try again.