From c755f478067ec7f8e1cee352e59e36d743e90a75 Mon Sep 17 00:00:00 2001 From: Denis Redozubov Date: Tue, 1 Mar 2016 14:41:24 +0300 Subject: [PATCH] use base-compat in servant-server --- servant-server/servant-server.cabal | 1 + servant-server/src/Servant/Server/Internal.hs | 4 +--- servant-server/src/Servant/Server/Internal/Enter.hs | 5 ++--- .../src/Servant/Server/Internal/RoutingApplication.hs | 4 +--- servant/servant.cabal | 2 +- stack.yaml | 1 + 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index 6167a2b4..a4609bd5 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -47,6 +47,7 @@ library Servant.Utils.StaticFiles build-depends: base >= 4.7 && < 5 + , base-compat >= 0.9 , aeson >= 0.7 && < 0.12 , attoparsec >= 0.12 && < 0.14 , base64-bytestring == 1.0.* diff --git a/servant-server/src/Servant/Server/Internal.hs b/servant-server/src/Servant/Server/Internal.hs index c170de9b..31c758b2 100644 --- a/servant-server/src/Servant/Server/Internal.hs +++ b/servant-server/src/Servant/Server/Internal.hs @@ -22,9 +22,6 @@ module Servant.Server.Internal , module Servant.Server.Internal.ServantErr ) where -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative ((<$>)) -#endif import Control.Monad.Trans.Except (ExceptT) import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC8 @@ -45,6 +42,7 @@ import Network.Wai (Application, Request, Response, rawQueryString, remoteHost, requestHeaders, requestMethod, responseLBS, vault) +import Prelude.Compat import Web.HttpApiData (FromHttpApiData) import Web.HttpApiData.Internal (parseHeaderMaybe, parseQueryParamMaybe, diff --git a/servant-server/src/Servant/Server/Internal/Enter.hs b/servant-server/src/Servant/Server/Internal/Enter.hs index 5bcebe9d..169a05b6 100644 --- a/servant-server/src/Servant/Server/Internal/Enter.hs +++ b/servant-server/src/Servant/Server/Internal/Enter.hs @@ -10,9 +10,6 @@ {-# LANGUAGE UndecidableInstances #-} module Servant.Server.Internal.Enter where -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative -#endif import qualified Control.Category as C #if MIN_VERSION_mtl(2,2,1) import Control.Monad.Except @@ -25,6 +22,8 @@ import qualified Control.Monad.State.Strict as SState import qualified Control.Monad.Writer.Lazy as LWriter import qualified Control.Monad.Writer.Strict as SWriter import Data.Typeable +import Prelude.Compat + import Servant.API class Enter typ arg ret | typ arg -> ret, typ ret -> arg where diff --git a/servant-server/src/Servant/Server/Internal/RoutingApplication.hs b/servant-server/src/Servant/Server/Internal/RoutingApplication.hs index cd1ac019..e7a53c3c 100644 --- a/servant-server/src/Servant/Server/Internal/RoutingApplication.hs +++ b/servant-server/src/Servant/Server/Internal/RoutingApplication.hs @@ -8,12 +8,10 @@ {-# LANGUAGE StandaloneDeriving #-} module Servant.Server.Internal.RoutingApplication where -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative ((<$>)) -#endif import Control.Monad.Trans.Except (ExceptT, runExceptT) import Network.Wai (Application, Request, Response, ResponseReceived) +import Prelude.Compat import Servant.Server.Internal.ServantErr type RoutingApplication = diff --git a/servant/servant.cabal b/servant/servant.cabal index 689fc0fb..849e3d05 100644 --- a/servant/servant.cabal +++ b/servant/servant.cabal @@ -47,7 +47,7 @@ library Servant.Utils.Links build-depends: base >=4.7 && <5 - , base-compat >= 0.8 + , base-compat >= 0.9 , aeson >= 0.7 , attoparsec >= 0.12 , bytestring == 0.10.* diff --git a/stack.yaml b/stack.yaml index c1aea0a2..adec1495 100644 --- a/stack.yaml +++ b/stack.yaml @@ -14,6 +14,7 @@ packages: - servant-mock/ - servant-server/ extra-deps: +- base-compat-0.9.0 - engine-io-wai-1.0.2 - control-monad-omega-0.3.1 - should-not-typecheck-2.0.1