I've just tested this, and with GHC 7, cabal chooses QuickCheck 2.4, whereas with GHC 6.12, it chooses 2.1. If I specify that 6.12 should choose 2.4 as well, I get the same issue there. This is to be expected, because I don't see the CPP checks you mentioned in Test/QuickCheck/Instances.hs in testpack-2.0.1. Perhaps you haven't released a version with those checks yet?
Erik On Thu, Mar 24, 2011 at 14:18, John Goerzen <jgoer...@complete.org> wrote: > Hi folks, > > I don't have a GHC 7 environment running yet (it's on my list...) but I > received a bug report pointing me at this build failure: > > http://hackage.haskell.org/packages/archive/testpack/2.0.1/logs/failure/ghc-7.0 > > Among other things, this noted: > > Dependency QuickCheck >=2.1.0.3: using QuickCheck-2.4.0.1 > > and the errors were: > > [1 of 3] Compiling Test.QuickCheck.Instances ( > src/Test/QuickCheck/Instances.hs, dist/build/Test/QuickCheck/Instances.o ) > > src/Test/QuickCheck/Instances.hs:39:10: > Duplicate instance declarations: > instance Arbitrary Word8 > -- Defined at src/Test/QuickCheck/Instances.hs:39:10-24 > instance Arbitrary Word8 -- Defined in Test.QuickCheck.Arbitrary > > src/Test/QuickCheck/Instances.hs:42:10: > Duplicate instance declarations: > instance CoArbitrary Word8 > -- Defined at src/Test/QuickCheck/Instances.hs:42:10-26 > instance CoArbitrary Word8 -- Defined in Test.QuickCheck.Arbitrary > > Now, that's fairly standard, and in fact, in my code, is wrapped with: > > #if MIN_VERSION_QuickCheck(2,3,0) > -- we have Word8 instances here > #else > instance Arbitrary Word8 where > arbitrary = sized $ \n -> choose (0, min (fromIntegral n) maxBound) > > instance CoArbitrary Word8 where > coarbitrary n = variant (if n >= 0 then 2 * x else 2 * x + 1) > where x = abs . fromIntegral $ n > #endif > > And that code has been working to support modern QuickCheck versions for > some time. > > It would appear that something in Cabal, GHC 7, or QuickCheck is breaking > this check. > > Ideas? > > -- John > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe