diff --git a/servant-client/servant-client.cabal b/servant-client/servant-client.cabal index 539e3fc0..ac01279a 100644 --- a/servant-client/servant-client.cabal +++ b/servant-client/servant-client.cabal @@ -36,6 +36,7 @@ library Servant.Common.Req build-depends: base >= 4.7 && < 4.10 + , base-compat >= 0.9.1 && < 0.10 , aeson >= 0.7 && < 1.1 , attoparsec >= 0.12 && < 0.14 , base64-bytestring >= 1.0.0.1 && < 1.1 @@ -72,6 +73,7 @@ test-suite spec , Servant.Common.BaseUrlSpec build-depends: base == 4.* + , base-compat , transformers , transformers-compat , aeson diff --git a/servant-client/src/Servant/Client.hs b/servant-client/src/Servant/Client.hs index 1f11d7ef..7554c536 100644 --- a/servant-client/src/Servant/Client.hs +++ b/servant-client/src/Servant/Client.hs @@ -27,9 +27,6 @@ module Servant.Client , module Servant.Common.BaseUrl ) where -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative ((<$>)) -#endif import Data.ByteString.Lazy (ByteString) import Data.List import Data.Proxy @@ -40,6 +37,8 @@ import Network.HTTP.Client (Response) import Network.HTTP.Media import qualified Network.HTTP.Types as H import qualified Network.HTTP.Types.Header as HTTP +import Prelude () +import Prelude.Compat import Servant.API import Servant.Client.Experimental.Auth import Servant.Common.BaseUrl diff --git a/servant-client/src/Servant/Common/Req.hs b/servant-client/src/Servant/Common/Req.hs index 7a8d7a1e..77de15d4 100644 --- a/servant-client/src/Servant/Common/Req.hs +++ b/servant-client/src/Servant/Common/Req.hs @@ -7,9 +7,9 @@ module Servant.Common.Req where -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative -#endif +import Prelude () +import Prelude.Compat + import Control.Exception import Control.Monad import Control.Monad.Catch (MonadThrow) diff --git a/servant-client/test/Servant/ClientSpec.hs b/servant-client/test/Servant/ClientSpec.hs index 98d9e9b5..7833cd4e 100644 --- a/servant-client/test/Servant/ClientSpec.hs +++ b/servant-client/test/Servant/ClientSpec.hs @@ -10,8 +10,8 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} @@ -26,9 +26,6 @@ #include "overlapping-compat.h" module Servant.ClientSpec where -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative ((<$>)) -#endif import Control.Arrow (left) import Control.Concurrent (forkIO, killThread, ThreadId) import Control.Exception (bracket) @@ -46,19 +43,21 @@ import qualified Network.HTTP.Types as HTTP import Network.Socket import Network.Wai (Request, requestHeaders, responseLBS) import Network.Wai.Handler.Warp +import Prelude () +import Prelude.Compat import System.IO.Unsafe (unsafePerformIO) +import Test.HUnit import Test.Hspec import Test.Hspec.QuickCheck -import Test.HUnit import Test.QuickCheck import Web.FormUrlEncoded (FromForm, ToForm) import Servant.API import Servant.API.Internal.Test.ComprehensiveAPI import Servant.Client +import qualified Servant.Common.Req as SCR import Servant.Server import Servant.Server.Experimental.Auth -import qualified Servant.Common.Req as SCR -- This declaration simply checks that all instances are in place. _ = client comprehensiveAPI diff --git a/servant-client/test/Servant/Common/BaseUrlSpec.hs b/servant-client/test/Servant/Common/BaseUrlSpec.hs index afe541ba..e25da65d 100644 --- a/servant-client/test/Servant/Common/BaseUrlSpec.hs +++ b/servant-client/test/Servant/Common/BaseUrlSpec.hs @@ -1,11 +1,9 @@ -{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Servant.Common.BaseUrlSpec where -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative -#endif import Control.DeepSeq +import Prelude () +import Prelude.Compat import Test.Hspec import Test.QuickCheck