From ca88a72bdec4d762dee0769136fa01cd3df31a14 Mon Sep 17 00:00:00 2001 From: aaron levin Date: Mon, 11 May 2015 18:16:53 -0400 Subject: [PATCH] improved description of BasicAuth lookup --- servant/src/Servant/API/Authentication.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/servant/src/Servant/API/Authentication.hs b/servant/src/Servant/API/Authentication.hs index e4c71453..d82b4472 100644 --- a/servant/src/Servant/API/Authentication.hs +++ b/servant/src/Servant/API/Authentication.hs @@ -11,8 +11,7 @@ import GHC.TypeLits (Symbol) -- type to encapsulate authentication logic. -- -- Example: --- >>> type AuthLookup = Text -> IO User --- >>> type MyApi = BasicAuth "book-realm" :> "books" :> Get '[JSON] [Book] +-- >>> type MyApi = BasicAuth "book-realm" DB :> "books" :> Get '[JSON] [Book] data BasicAuth (realm :: Symbol) lookup deriving (Typeable) @@ -20,6 +19,6 @@ data BasicAuth (realm :: Symbol) lookup -- >>> import Servant.API -- >>> import Data.Aeson -- >>> import Data.Text --- >>> data User +-- >>> data DB -- >>> data Book -- >>> instance ToJSON Book where { toJSON = undefined }