1. Bryan O'Sullivan
  2. bloomfilter

Commits

Bryan O'Sullivan  committed 98ecccf

Drop duplicate Random instance for Int64

  • Participants
  • Parent commits bd98427
  • Branches default

Comments (0)

Files changed (1)

File tests/QCSupport.hs

View file
  • Ignore whitespace
 instance Arbitrary Ordering where
     arbitrary = oneof [return LT, return GT, return EQ]
 
--- For some reason, MIN_VERSION_random doesn't work here :-(
-#if __GLASGOW_HASKELL__ < 704
-integralRandomR :: (Integral a, RandomGen g) => (a, a) -> g -> (a, g)
-integralRandomR (a,b) g = case randomR (fromIntegral a :: Int,
-                                        fromIntegral b :: Int) g
-                          of (x,g') -> (fromIntegral x, g')
-
-instance Random Int64 where
-  randomR = integralRandomR
-  random = randomR (minBound,maxBound)
-#endif
-
 instance Arbitrary LB.ByteString where
     arbitrary = sized $ \n -> resize (round (sqrt (toEnum n :: Double)))
                 ((LB.fromChunks . filter (not . SB.null)) `fmap` arbitrary)