From 343f55f61a98900410b2e97cc7cea6dee25b5eb7 Mon Sep 17 00:00:00 2001 From: "Julian K. Arni" Date: Sun, 28 Aug 2016 20:50:42 -0300 Subject: [PATCH] Removing GHC 7.8 support. It never really existed. --- .travis.yml | 2 -- servant-quickcheck.cabal | 32 +++++++++---------- src/Servant/QuickCheck/Internal/ErrorTypes.hs | 5 +-- src/Servant/QuickCheck/Internal/Predicates.hs | 2 +- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83d437e..c18b6f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ sudo: false language: c env: - - GHCVER=7.8.4 - GHCVER=7.10.2 addons: @@ -11,7 +10,6 @@ addons: sources: - hvr-ghc packages: - - ghc-7.8.4 - ghc-7.10.2 - cabal-install-1.22 - libgmp-dev diff --git a/servant-quickcheck.cabal b/servant-quickcheck.cabal index 7975a54..c79159b 100644 --- a/servant-quickcheck.cabal +++ b/servant-quickcheck.cabal @@ -27,30 +27,28 @@ library , Servant.QuickCheck.Internal.QuickCheck , Servant.QuickCheck.Internal.Equality , Servant.QuickCheck.Internal.ErrorTypes - build-depends: base >=4.7 && <4.9 + build-depends: base >=4.8 && <4.9 , base-compat == 0.9.* - , QuickCheck == 2.8.* + , aeson > 0.8 && < 0.12 , bytestring == 0.10.* - , aeson > 0.10 && < 0.12 - , mtl == 2.2.* + , case-insensitive == 1.2.* + , data-default-class == 0.0.* + , hspec == 2.2.* , http-client == 0.4.* - , http-types == 0.9.* , http-media == 0.6.* + , http-types > 0.8 && < 0.10 + , mtl > 2.1 && < 2.3 + , pretty == 1.1.* + , process == 1.2.* + , QuickCheck > 2.7 && < 2.9 + , servant > 0.6 && < 0.9 , servant-client > 0.6 && < 0.9 , servant-server > 0.6 && < 0.9 - , string-conversions == 0.4.* - , data-default-class == 0.0.* - , servant > 0.6 && < 0.9 - , warp >= 3.2.4 && < 3.3 - , process == 1.2.* - , temporary == 1.2.* , split == 0.2.* - , case-insensitive == 1.2.* - , hspec == 2.2.* + , string-conversions > 0.3 && < 0.5 + , temporary == 1.2.* , text == 1.* - , pretty == 1.1.* - if impl(ghc < 7.10) - build-depends: bifunctors == 5.* + , warp >= 3.2.4 && < 3.3 hs-source-dirs: src default-extensions: TypeOperators @@ -68,7 +66,7 @@ library , OverloadedStrings , FunctionalDependencies , NoImplicitPrelude - , AutoDeriveTypeable + , DeriveDataTypeable default-language: Haskell2010 test-suite spec diff --git a/src/Servant/QuickCheck/Internal/ErrorTypes.hs b/src/Servant/QuickCheck/Internal/ErrorTypes.hs index eac71f7..1d9cb9e 100644 --- a/src/Servant/QuickCheck/Internal/ErrorTypes.hs +++ b/src/Servant/QuickCheck/Internal/ErrorTypes.hs @@ -4,6 +4,7 @@ import Control.Exception (Exception (..)) import qualified Data.ByteString.Lazy as LBS import Data.String.Conversions (cs) import qualified Data.Text as T +import Data.Typeable (Typeable) import GHC.Generics (Generic) import qualified Network.HTTP.Client as C import Network.HTTP.Types (Header, statusCode) @@ -12,7 +13,7 @@ import Text.PrettyPrint data PredicateFailure = PredicateFailure T.Text (Maybe C.Request) (C.Response LBS.ByteString) - deriving (Generic) + deriving (Typeable, Generic) instance Exception ServerEqualityFailure where @@ -22,7 +23,7 @@ instance Show PredicateFailure where data ServerEqualityFailure = ServerEqualityFailure C.Request (C.Response LBS.ByteString) (C.Response LBS.ByteString) - deriving (Generic) + deriving (Typeable, Generic) instance Show ServerEqualityFailure where show = render . prettyServerEqualityFailure diff --git a/src/Servant/QuickCheck/Internal/Predicates.hs b/src/Servant/QuickCheck/Internal/Predicates.hs index dd8de9f..9ece936 100644 --- a/src/Servant/QuickCheck/Internal/Predicates.hs +++ b/src/Servant/QuickCheck/Internal/Predicates.hs @@ -1,7 +1,7 @@ module Servant.QuickCheck.Internal.Predicates where import Control.Exception (catch, throw) -import Control.Monad.Reader +import Control.Monad (when, unless, liftM2) import Data.Aeson (Object, decode) import qualified Data.ByteString as SBS import qualified Data.ByteString.Char8 as SBSC