on master help sign in
fix compilation error: move import declaration and add cookie to dependencies
4b9d60cKazuki Okamoto
doc/tutorial/Authentication.lhs+1−1
@@ -69,6 +69,7 @@ import Servant.Server (BasicAuthCheck (BasicAuthCheck),
69import Servant.Server.Experimental.Auth (AuthHandler, AuthServerData,
69import Servant.Server.Experimental.Auth (AuthHandler, AuthServerData,
70 mkAuthHandler)
70 mkAuthHandler)
71import Servant.Server.Experimental.Auth()
71import Servant.Server.Experimental.Auth()
72+import Web.Cookie (parseCookies)
72
73
73-- | private data that needs protection
74-- | private data that needs protection
74newtype PrivateData = PrivateData { ssshhh :: Text }
75newtype PrivateData = PrivateData { ssshhh :: Text }
@@ -285,7 +286,6 @@ method (note: we depend upon [`cookie`](https://hackage.haskell.org/package/cook
285`parseCookies` for this):
286`parseCookies` for this):
286
287
287```haskell
288```haskell
288−import Web.Cookie (parseCookies)
289
289
290--- | The auth handler wraps a function from Request -> Handler Account.
290--- | The auth handler wraps a function from Request -> Handler Account.
291--- We look for a token in the request headers that we expect to be in the cookie.
291--- We look for a token in the request headers that we expect to be in the cookie.
doc/tutorial/tutorial.cabal+1
@@ -45,6 +45,7 @@ library
45 , transformers
45 , transformers
46 , markdown-unlit >= 0.4
46 , markdown-unlit >= 0.4
47 , http-client
47 , http-client
48+ , cookie
48 default-language: Haskell2010
49 default-language: Haskell2010
49 ghc-options: -Wall -pgmL markdown-unlit
50 ghc-options: -Wall -pgmL markdown-unlit
50 build-tool-depends: markdown-unlit:markdown-unlit
51 build-tool-depends: markdown-unlit:markdown-unlit