@@ -5,8 +5,6 @@ module QuickCheckUtils where
55import Control.Arrow (first)
66import Data.Char (chr)
77import Data.Bits ((.&.))
8−import Data.Int (Int64)
9−import Data.Word (Word8, Word16, Word32)
108import Data.String (IsString, fromString)
119import qualified Data.Text as T
1210import Data.Text.Foreign (I16)
@@ -15,13 +13,6 @@ import System.Random (Random(..), RandomGen)
1513import Test.QuickCheck hiding ((.&.))
1614import qualified Data.ByteString as B
1715
18−instance Random Int64 where
19− randomR = integralRandomR
20− random = randomR (minBound,maxBound)
21−
22−instance Arbitrary Int64 where
23− arbitrary = choose (minBound,maxBound)
24−
2516instance Random I16 where
2617 randomR = integralRandomR
2718 random = randomR (minBound,maxBound)
@@ -29,30 +20,9 @@ instance Random I16 where
2920instance Arbitrary I16 where
3021 arbitrary = choose (minBound,maxBound)
3122
32−instance Random Word8 where
33− randomR = integralRandomR
34− random = randomR (minBound,maxBound)
35−
36−instance Arbitrary Word8 where
37− arbitrary = choose (minBound,maxBound)
38−
3923instance Arbitrary B.ByteString where
4024 arbitrary = B.pack `fmap` arbitrary
4125
42−instance Random Word16 where
43− randomR = integralRandomR
44− random = randomR (minBound,maxBound)
45−
46−instance Arbitrary Word16 where
47− arbitrary = choose (minBound,maxBound)
48−
49−instance Random Word32 where
50− randomR = integralRandomR
51− random = randomR (minBound,maxBound)
52−
53−instance Arbitrary Word32 where
54− arbitrary = choose (minBound,maxBound)
55−
5626genUnicode :: IsString a => Gen a
5727genUnicode = fmap fromString string where
5828 string = sized $ \n ->