[Haskell-cafe] GHC 7/Cabal request for help
John Goerzen
jgoerzen at complete.org
Thu Mar 24 14:18:13 CET 2011
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
More information about the Haskell-Cafe
mailing list