diff --git a/generic-arbitrary.cabal b/generic-arbitrary.cabal index 9c5b357..69e59c8 100644 --- a/generic-arbitrary.cabal +++ b/generic-arbitrary.cabal @@ -16,7 +16,7 @@ category: Generic build-type: Simple extra-source-files: CHANGELOG.md , README.md -cabal-version: 1.22 +cabal-version: 2.0 tested-with: GHC == 8.6.5 , GHC == 8.10.7 , GHC == 9.0.2 @@ -31,7 +31,7 @@ source-repository head library exposed-modules: Test.QuickCheck.Arbitrary.Generic build-depends: base >=4.8 && <5 - , QuickCheck + , QuickCheck >=2.8 hs-source-dirs: src default-language: Haskell2010 default-extensions: AllowAmbiguousTypes @@ -59,13 +59,13 @@ test-suite test hs-source-dirs: test main-is: Test.hs default-language: Haskell2010 - build-depends: base >= 4.8 && <5 - , QuickCheck + build-depends: base >=4.12 && <5 + , QuickCheck >=2.10 , deepseq , generic-arbitrary - , tasty - , tasty-discover - , tasty-hunit + , tasty >=1.4.2 || <1.4.0.1 + , tasty-discover >= 2.0.0 + , tasty-hunit >= 0.9.2 , tasty-quickcheck other-modules: Auxiliary , EnumTest @@ -94,9 +94,8 @@ test-suite test , TypeSynonymInstances , UndecidableInstances , ViewPatterns - build-tools: tasty-discover + build-tool-depends: tasty-discover:tasty-discover ghc-options: -Wall -threaded -rtsopts "-with-rtsopts=-N -A64m -qb0 -n4m -T -I1" - default-extensions: DeriveGeneric diff --git a/src/Test/QuickCheck/Arbitrary/Generic.hs b/src/Test/QuickCheck/Arbitrary/Generic.hs index 3db83a4..1685b5f 100644 --- a/src/Test/QuickCheck/Arbitrary/Generic.hs +++ b/src/Test/QuickCheck/Arbitrary/Generic.hs @@ -1,3 +1,10 @@ +#if __GLASGOW_HASKELL__ >= 806 +{-# OPTIONS_GHC -Wno-star-is-type #-} +#endif +#if __GLASGOW_HASKELL__ >= 800 +{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} +#endif + {-| This module is a generic implementation of the 'arbitrary' method. Example @@ -146,13 +153,14 @@ module Test.QuickCheck.Arbitrary.Generic ) where import Control.Applicative -import Data.Coerce (coerce) import Data.Proxy import Data.Type.Bool import GHC.Generics as G import GHC.TypeLits +import Prelude import Test.QuickCheck as QC #if MIN_VERSION_QuickCheck(2, 14, 0) +import Data.Coerce (coerce) import Test.QuickCheck.Arbitrary (GSubterms, RecursivelyShrink) diff --git a/test/EnumTest.hs b/test/EnumTest.hs index 0957cdb..e1ffda6 100644 --- a/test/EnumTest.hs +++ b/test/EnumTest.hs @@ -1,6 +1,6 @@ #if __GLASGOW_HASKELL__ >= 806 && __GLASGOW_HASKELL__ <= 900 {-# OPTIONS_GHC -fconstraint-solver-iterations=5 #-} -#elif __GLASGOW_HASKELL__ >= 902 && __GLASGOW_HASKELL__ <= 908 +#elif __GLASGOW_HASKELL__ >= 902 {-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-} #endif diff --git a/test/RecursiveTest.hs b/test/RecursiveTest.hs index fbb0aa6..a2c9ad0 100644 --- a/test/RecursiveTest.hs +++ b/test/RecursiveTest.hs @@ -8,7 +8,7 @@ module RecursiveTest where -import Control.DeepSeq hiding (Unit) +import Control.DeepSeq (NFData) import GHC.Generics (Generic) import Test.QuickCheck import Test.QuickCheck.Arbitrary.Generic