From 6ff70e2cdf05bedbc27f3305b923c02a4cbfba4f 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/servant-server.cabal | 3 +-- servant-server/test/Servant/ServerSpec.hs | 13 +++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index 56e4daaf..f548d270 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -1,6 +1,5 @@ name: servant-server -version: 0.11 -x-revision: 2 +version: 0.11.0.1 synopsis: A family of combinators for defining webservices APIs and serving them description: A family of combinators for defining webservices APIs and serving them diff --git a/servant-server/test/Servant/ServerSpec.hs b/servant-server/test/Servant/ServerSpec.hs index 0a641559..adfc134c 100644 --- a/servant-server/test/Servant/ServerSpec.hs +++ b/servant-server/test/Servant/ServerSpec.hs @@ -28,7 +28,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, @@ -65,6 +69,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. @@ -657,7 +666,7 @@ basicAuthApi = Proxy basicAuthServer :: Server BasicAuthAPI basicAuthServer = const (return jerry) :<|> - (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "") + (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "") basicAuthContext :: Context '[ BasicAuthCheck () ] basicAuthContext = @@ -702,7 +711,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") = ()