use base-compat
This commit is contained in:
parent
e34003e9af
commit
c528eb24ca
7 changed files with 9 additions and 19 deletions
|
@ -47,6 +47,7 @@ library
|
|||
Servant.Utils.Links
|
||||
build-depends:
|
||||
base >=4.7 && <5
|
||||
, base-compat >= 0.8
|
||||
, aeson >= 0.7
|
||||
, attoparsec >= 0.12
|
||||
, bytestring == 0.10.*
|
||||
|
|
|
@ -9,12 +9,9 @@
|
|||
{-# OPTIONS_HADDOCK not-home #-}
|
||||
module Servant.API.Alternative ((:<|>)(..)) where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Data.Monoid (Monoid (..))
|
||||
import Data.Traversable (Traversable)
|
||||
import Data.Foldable (Foldable)
|
||||
#endif
|
||||
import Data.Typeable (Typeable)
|
||||
import Prelude.Compat (Monoid(..), Traversable, Foldable)
|
||||
|
||||
-- | Union of two APIs, first takes precedence in case of overlap.
|
||||
--
|
||||
-- Example:
|
||||
|
|
|
@ -72,11 +72,8 @@ module Servant.API.ContentTypes
|
|||
, canHandleAcceptH
|
||||
) where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative ((*>), (<*))
|
||||
#endif
|
||||
import Control.Arrow (left)
|
||||
import Control.Monad
|
||||
import Control.Monad.Compat hiding (mapM)
|
||||
import Data.Aeson (FromJSON(..), ToJSON(..), encode)
|
||||
import Data.Aeson.Parser (value)
|
||||
import Data.Aeson.Types (parseEither)
|
||||
|
@ -88,7 +85,7 @@ import Data.ByteString.Lazy (ByteString, fromStrict,
|
|||
import qualified Data.ByteString.Lazy as B
|
||||
import qualified Data.ByteString.Lazy.Char8 as BC
|
||||
import Data.Maybe (isJust)
|
||||
import Data.Monoid
|
||||
import Data.Monoid.Compat
|
||||
import Data.String.Conversions (cs)
|
||||
import qualified Data.Text as TextS
|
||||
import qualified Data.Text.Encoding as TextS
|
||||
|
@ -99,6 +96,7 @@ import GHC.Generics (Generic)
|
|||
import qualified Network.HTTP.Media as M
|
||||
import Network.URI (escapeURIString,
|
||||
isUnreserved, unEscapeString)
|
||||
import Prelude.Compat ((<*), (*>))
|
||||
|
||||
-- * Provided content types
|
||||
data JSON deriving Typeable
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
module Servant.API.Internal.Test.ComprehensiveAPI where
|
||||
|
||||
import Data.Proxy
|
||||
|
||||
import Servant.API
|
||||
|
||||
type GET = Get '[JSON] ()
|
||||
|
|
|
@ -30,9 +30,6 @@ module Servant.API.ResponseHeaders
|
|||
, HList(..)
|
||||
) where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative ((<$>))
|
||||
#endif
|
||||
import Data.ByteString.Char8 as BS (pack, unlines, init)
|
||||
import Data.ByteString.Conversion (ToByteString, toByteString',
|
||||
FromByteString, fromByteString)
|
||||
|
@ -42,6 +39,7 @@ import GHC.TypeLits (KnownSymbol, symbolVal)
|
|||
import qualified Network.HTTP.Types.Header as HTTP
|
||||
|
||||
import Servant.API.Header (Header (..))
|
||||
import Prelude.Compat
|
||||
|
||||
-- | Response Header objects. You should never need to construct one directly.
|
||||
-- Instead, use 'addHeader'.
|
||||
|
|
|
@ -105,11 +105,7 @@ import Data.List
|
|||
import Data.Proxy ( Proxy(..) )
|
||||
import qualified Data.Text as Text
|
||||
import qualified Data.ByteString.Char8 as BSC
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Data.Monoid ( Monoid(..), (<>) )
|
||||
#else
|
||||
import Data.Monoid ( (<>) )
|
||||
#endif
|
||||
import Data.Monoid.Compat ( Monoid(..), (<>) )
|
||||
import Network.URI ( URI(..), escapeURIString, isUnreserved )
|
||||
import GHC.TypeLits ( KnownSymbol, symbolVal )
|
||||
import GHC.Exts(Constraint)
|
||||
|
|
|
@ -12,6 +12,7 @@ packages:
|
|||
- servant-mock/
|
||||
- servant-server/
|
||||
extra-deps:
|
||||
- base-compat-0.9.0
|
||||
- hspec-2.2.0
|
||||
- hspec-core-2.2.0
|
||||
- hspec-discover-2.2.0
|
||||
|
|
Loading…
Reference in a new issue