on master help sign in
Make -Wall less noisy.
commit663fbaaabb5ebdb6a4e1827a870dbac03306f917 authorMatthias Fischmann <mf@zerobuzz.net> dateTue 6 Jan 2015, 17:26 (12 years ago) parent2f9c634
2 files changed+7−7
test/Servant/ServerSpec.hs+6−6 test/Servant/Utils/StaticFilesSpec.hs+1−1
test/Servant/ServerSpec.hs+6−6
@@ -94,8 +94,8 @@ captureSpec = do
9494
9595 with (return (serve
9696 (Proxy :: Proxy (Capture "captured" String :> Raw))
97− (\ "captured" request respond ->
98− respond $ responseLBS ok200 [] (cs $ show $ pathInfo request)))) $ do
97+ (\ "captured" request_ respond ->
98+ respond $ responseLBS ok200 [] (cs $ show $ pathInfo request_)))) $ do
9999 it "strips the captured path snippet from pathInfo" $ do
100100 get "/captured/foo" `shouldRespondWith` (fromString (show ["foo" :: String]))
101101
@@ -134,7 +134,7 @@ qpServer = queryParamServer :<|> qpNames :<|> qpCapitalize
134134 qpCapitalize False = return alice
135135 qpCapitalize True = return alice { name = map toUpper (name alice) }
136136
137− queryParamServer (Just name) = return alice{name = name}
137+ queryParamServer (Just name_) = return alice{name = name_}
138138 queryParamServer Nothing = return alice
139139
140140queryParamSpec :: Spec
@@ -222,7 +222,7 @@ type RawApi = "foo" :> Raw
222222rawApi :: Proxy RawApi
223223rawApi = Proxy
224224rawApplication :: 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_)
226226
227227rawSpec :: Spec
228228rawSpec = do
@@ -264,7 +264,7 @@ unionSpec = do
264264 liftIO $ do
265265 decode' (simpleBody response) `shouldBe`
266266 Just alice
267− response <- get "/bar"
267+ response_ <- get "/bar"
268268 liftIO $ do
269− decode' (simpleBody response) `shouldBe`
269+ decode' (simpleBody response_) `shouldBe`
270270 Just jerry
test/Servant/Utils/StaticFilesSpec.hs+1−1
@@ -35,7 +35,7 @@ app = serve api server
3535
3636server :: Server Api
3737server =
38− (\ name -> return (Person name 42))
38+ (\ name_ -> return (Person name_ 42))
3939 :<|> serveDirectory "static"
4040
4141withStaticFiles :: IO () -> IO ()