Make -Wall less noisy.
This commit is contained in:
parent
2f9c6340c4
commit
663fbaaabb
2 changed files with 7 additions and 7 deletions
|
@ -94,8 +94,8 @@ captureSpec = do
|
||||||
|
|
||||||
with (return (serve
|
with (return (serve
|
||||||
(Proxy :: Proxy (Capture "captured" String :> Raw))
|
(Proxy :: Proxy (Capture "captured" String :> Raw))
|
||||||
(\ "captured" request respond ->
|
(\ "captured" request_ respond ->
|
||||||
respond $ responseLBS ok200 [] (cs $ show $ pathInfo request)))) $ do
|
respond $ responseLBS ok200 [] (cs $ show $ pathInfo request_)))) $ do
|
||||||
it "strips the captured path snippet from pathInfo" $ do
|
it "strips the captured path snippet from pathInfo" $ do
|
||||||
get "/captured/foo" `shouldRespondWith` (fromString (show ["foo" :: String]))
|
get "/captured/foo" `shouldRespondWith` (fromString (show ["foo" :: String]))
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ qpServer = queryParamServer :<|> qpNames :<|> qpCapitalize
|
||||||
qpCapitalize False = return alice
|
qpCapitalize False = return alice
|
||||||
qpCapitalize True = return alice { name = map toUpper (name alice) }
|
qpCapitalize True = return alice { name = map toUpper (name alice) }
|
||||||
|
|
||||||
queryParamServer (Just name) = return alice{name = name}
|
queryParamServer (Just name_) = return alice{name = name_}
|
||||||
queryParamServer Nothing = return alice
|
queryParamServer Nothing = return alice
|
||||||
|
|
||||||
queryParamSpec :: Spec
|
queryParamSpec :: Spec
|
||||||
|
@ -222,7 +222,7 @@ type RawApi = "foo" :> Raw
|
||||||
rawApi :: Proxy RawApi
|
rawApi :: Proxy RawApi
|
||||||
rawApi = Proxy
|
rawApi = Proxy
|
||||||
rawApplication :: Show a => (Request -> a) -> Application
|
rawApplication :: Show a => (Request -> a) -> Application
|
||||||
rawApplication f request respond = respond $ responseLBS ok200 [] (cs $ show $ f request)
|
rawApplication f request_ respond = respond $ responseLBS ok200 [] (cs $ show $ f request_)
|
||||||
|
|
||||||
rawSpec :: Spec
|
rawSpec :: Spec
|
||||||
rawSpec = do
|
rawSpec = do
|
||||||
|
@ -264,7 +264,7 @@ unionSpec = do
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
decode' (simpleBody response) `shouldBe`
|
decode' (simpleBody response) `shouldBe`
|
||||||
Just alice
|
Just alice
|
||||||
response <- get "/bar"
|
response_ <- get "/bar"
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
decode' (simpleBody response) `shouldBe`
|
decode' (simpleBody response_) `shouldBe`
|
||||||
Just jerry
|
Just jerry
|
||||||
|
|
|
@ -35,7 +35,7 @@ app = serve api server
|
||||||
|
|
||||||
server :: Server Api
|
server :: Server Api
|
||||||
server =
|
server =
|
||||||
(\ name -> return (Person name 42))
|
(\ name_ -> return (Person name_ 42))
|
||||||
:<|> serveDirectory "static"
|
:<|> serveDirectory "static"
|
||||||
|
|
||||||
withStaticFiles :: IO () -> IO ()
|
withStaticFiles :: IO () -> IO ()
|
||||||
|
|
Loading…
Reference in a new issue