on master help sign in
Make -Wall less noisy.
663fbaaMatthias Fischmann
test/Servant/ServerSpec.hs+6−6
@@ -94,8 +94,8 @@ captureSpec = do
94
94
95 with (return (serve
95 with (return (serve
96 (Proxy :: Proxy (Capture "captured" String :> Raw))
96 (Proxy :: Proxy (Capture "captured" String :> Raw))
97− (\ "captured" request respond ->
97+ (\ "captured" request_ respond ->
98− respond $ responseLBS ok200 [] (cs $ show $ pathInfo request)))) $ do
98+ respond $ responseLBS ok200 [] (cs $ show $ pathInfo request_)))) $ do
99 it "strips the captured path snippet from pathInfo" $ do
99 it "strips the captured path snippet from pathInfo" $ do
100 get "/captured/foo" `shouldRespondWith` (fromString (show ["foo" :: String]))
100 get "/captured/foo" `shouldRespondWith` (fromString (show ["foo" :: String]))
101
101
@@ -134,7 +134,7 @@ qpServer = queryParamServer :<|> qpNames :<|> qpCapitalize
134 qpCapitalize False = return alice
134 qpCapitalize False = return alice
135 qpCapitalize True = return alice { name = map toUpper (name alice) }
135 qpCapitalize True = return alice { name = map toUpper (name alice) }
136
136
137− queryParamServer (Just name) = return alice{name = name}
137+ queryParamServer (Just name_) = return alice{name = name_}
138 queryParamServer Nothing = return alice
138 queryParamServer Nothing = return alice
139
139
140queryParamSpec :: Spec
140queryParamSpec :: Spec
@@ -222,7 +222,7 @@ type RawApi = "foo" :> Raw
222rawApi :: Proxy RawApi
222rawApi :: Proxy RawApi
223rawApi = Proxy
223rawApi = Proxy
224rawApplication :: Show a => (Request -> a) -> Application
224rawApplication :: Show a => (Request -> a) -> Application
225−rawApplication f request respond = respond $ responseLBS ok200 [] (cs $ show $ f request)
225+rawApplication f request_ respond = respond $ responseLBS ok200 [] (cs $ show $ f request_)
226
226
227rawSpec :: Spec
227rawSpec :: Spec
228rawSpec = do
228rawSpec = do
@@ -264,7 +264,7 @@ unionSpec = do
264 liftIO $ do
264 liftIO $ do
265 decode' (simpleBody response) `shouldBe`
265 decode' (simpleBody response) `shouldBe`
266 Just alice
266 Just alice
267− response <- get "/bar"
267+ response_ <- get "/bar"
268 liftIO $ do
268 liftIO $ do
269− decode' (simpleBody response) `shouldBe`
269+ decode' (simpleBody response_) `shouldBe`
270 Just jerry
270 Just jerry
test/Servant/Utils/StaticFilesSpec.hs+1−1
@@ -35,7 +35,7 @@ app = serve api server
35
35
36server :: Server Api
36server :: Server Api
37server =
37server =
38− (\ name -> return (Person name 42))
38+ (\ name_ -> return (Person name_ 42))
39 :<|> serveDirectory "static"
39 :<|> serveDirectory "static"
40
40
41withStaticFiles :: IO () -> IO ()
41withStaticFiles :: IO () -> IO ()