@@ -47,7 +47,7 @@ import Servant.API ((:<|>) (..), (:>), AuthProtect,
4747 Raw, RemoteHost, ReqBody,
4848 StdMethod (..), Verb, addHeader)
4949import Servant.API.Internal.Test.ComprehensiveAPI
50−import Servant.Server (Server, Handler, err401, err403,
50+import Servant.Server (Server, Handler, Tagged (..), err401, err403,
5151 err404, serve, serveWithContext,
5252 Context((:.), EmptyContext))
5353import Test.Hspec (Spec, context, describe, it,
@@ -210,7 +210,7 @@ captureSpec = do
210210
211211 with (return (serve
212212 (Proxy :: Proxy (Capture "captured" String :> Raw))
213− (\ "captured" request_ respond ->
213+ (\ "captured" -> Tagged $ \request_ respond ->
214214 respond $ responseLBS ok200 [] (cs $ show $ pathInfo request_)))) $ do
215215 it "strips the captured path snippet from pathInfo" $ do
216216 get "/captured/foo" `shouldRespondWith` (fromString (show ["foo" :: String]))
@@ -262,7 +262,7 @@ captureAllSpec = do
262262
263263 with (return (serve
264264 (Proxy :: Proxy (CaptureAll "segments" String :> Raw))
265− (\ _captured request_ respond ->
265+ (\ _captured -> Tagged $ \request_ respond ->
266266 respond $ responseLBS ok200 [] (cs $ show $ pathInfo request_)))) $ do
267267 it "consumes everything from pathInfo" $ do
268268 get "/captured/foo/bar/baz" `shouldRespondWith` (fromString (show ([] :: [Int])))
@@ -494,9 +494,10 @@ type RawApi = "foo" :> Raw
494494rawApi :: Proxy RawApi
495495rawApi = Proxy
496496
497−rawApplication :: Show a => (Request -> a) -> Application
498−rawApplication f request_ respond = respond $ responseLBS ok200 []
499− (cs $ show $ f request_)
497+rawApplication :: Show a => (Request -> a) -> Tagged m Application
498+rawApplication f = Tagged $ \request_ respond ->
499+ respond $ responseLBS ok200 []
500+ (cs $ show $ f request_)
500501
501502rawSpec :: Spec
502503rawSpec = do
@@ -651,7 +652,7 @@ basicAuthApi = Proxy
651652basicAuthServer :: Server BasicAuthAPI
652653basicAuthServer =
653654 const (return jerry) :<|>
654− (\ _ respond -> respond $ responseLBS imATeaPot418 [] "")
655+ (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
655656
656657basicAuthContext :: Context '[ BasicAuthCheck () ]
657658basicAuthContext =
@@ -696,7 +697,7 @@ genAuthApi = Proxy
696697
697698genAuthServer :: Server GenAuthAPI
698699genAuthServer = const (return tweety)
699− :<|> (\ _ respond -> respond $ responseLBS imATeaPot418 [] "")
700+ :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
700701
701702type instance AuthServerData (AuthProtect "auth") = ()
702703