Fix tests under GHC 7.0
authorBryan O'Sullivan <bos@serpentine.com>
Wed, 12 Nov 2014 04:45:33 +0000 (20:45 -0800)
committerBryan O'Sullivan <bos@serpentine.com>
Wed, 12 Nov 2014 04:45:33 +0000 (20:45 -0800)
tests/Tests/QuickCheckUtils.hs

index 6aa45e0..836e911 100644 (file)
@@ -76,7 +76,15 @@ instance Arbitrary B.ByteString where
     shrink        = map B.pack . shrink . B.unpack
 
 #if !MIN_VERSION_base(4,4,0)
-instance Random Word8 where
+instance Random Int64 where
+    randomR = integralRandomR
+    random  = randomR (minBound,maxBound)
+
+instance Random Word where
+    randomR = integralRandomR
+    random  = randomR (minBound,maxBound)
+
+instance Random Word64 where
     randomR = integralRandomR
     random  = randomR (minBound,maxBound)
 #endif