From 09485871f5109c0620bfd571998bacc80f7a5b63 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Mon, 23 Oct 2017 08:04:28 +0300 Subject: [PATCH] Adopt http-types-0.10 --- servant-server/test/Servant/ServerSpec.hs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/servant-server/test/Servant/ServerSpec.hs b/servant-server/test/Servant/ServerSpec.hs index 49bde8ca..f2d86785 100644 --- a/servant-server/test/Servant/ServerSpec.hs +++ b/servant-server/test/Servant/ServerSpec.hs @@ -33,7 +33,11 @@ import Network.HTTP.Types (Status (..), hAccept, hContentType, methodDelete, methodGet, methodHead, methodPatch, methodPost, methodPut, ok200, +#if MIN_VERSION_http_types(0,10,0) + imATeapot418, +#else imATeaPot418, +#endif parseQuery) import Network.Wai (Application, Request, requestHeaders, pathInfo, queryString, rawQueryString, @@ -70,6 +74,11 @@ import Servant.Server.Experimental.Auth import Servant.Server.Internal.Context (NamedContext(..)) +#if !MIN_VERSION_http_types(0,10,0) +imATeapot418 :: Status +imATeapot418 = imATeaPot418 +#endif + -- * comprehensive api test -- This declaration simply checks that all instances are in place. @@ -662,7 +671,7 @@ basicAuthApi = Proxy basicAuthServer :: Server BasicAuthAPI basicAuthServer = const (return jerry) :<|> - (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "") + (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "") basicAuthContext :: Context '[ BasicAuthCheck () ] basicAuthContext = @@ -707,7 +716,7 @@ genAuthApi = Proxy genAuthServer :: Server GenAuthAPI genAuthServer = const (return tweety) - :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "") + :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "") type instance AuthServerData (AuthProtect "auth") = ()