Commits

Anonymous committed c55b187

Remove dead code, courtesy of QuickCheck 2.3

Comments (0)

Files changed (2)

tests/Properties.hs

 instance Show DecodeErr where
     show (DE d _) = "DE " ++ d
 
-instance CoArbitrary Word8 where
-    coarbitrary = coarbitraryIntegral
-
 instance Arbitrary DecodeErr where
     arbitrary = oneof [ return $ DE "lenient" lenientDecode
                       , return $ DE "ignore" ignore
 
 t_read_rational p tol (n::Double) s =
     case p (T.pack (show n) `T.append` t) of
-      Left err      -> False
+      Left _err     -> False
       Right (n',t') -> t == t' && abs (n-n') <= tol
     where t = T.dropWhile isFloaty s
 
 tl_read_rational p tol (n::Double) s =
     case p (TL.pack (show n) `TL.append` t) of
-      Left err      -> False
+      Left _err     -> False
       Right (n',t') -> t == t' && abs (n-n') <= tol
     where t = TL.dropWhile isFloaty s
 

tests/QuickCheckUtils.hs

 import Control.Arrow (first)
 import Data.Char (chr)
 import Data.Bits ((.&.))
-import Data.Int (Int64)
-import Data.Word (Word8, Word16, Word32)
 import Data.String (IsString, fromString)
 import qualified Data.Text as T
 import Data.Text.Foreign (I16)
 import Test.QuickCheck hiding ((.&.))
 import qualified Data.ByteString as B
 
-instance Random Int64 where
-    randomR = integralRandomR
-    random  = randomR (minBound,maxBound)
-
-instance Arbitrary Int64 where
-    arbitrary     = choose (minBound,maxBound)
-
 instance Random I16 where
     randomR = integralRandomR
     random  = randomR (minBound,maxBound)
 instance Arbitrary I16 where
     arbitrary     = choose (minBound,maxBound)
 
-instance Random Word8 where
-    randomR = integralRandomR
-    random  = randomR (minBound,maxBound)
-
-instance Arbitrary Word8 where
-    arbitrary     = choose (minBound,maxBound)
-
 instance Arbitrary B.ByteString where
     arbitrary     = B.pack `fmap` arbitrary
 
-instance Random Word16 where
-    randomR = integralRandomR
-    random  = randomR (minBound,maxBound)
-
-instance Arbitrary Word16 where
-    arbitrary     = choose (minBound,maxBound)
-
-instance Random Word32 where
-    randomR = integralRandomR
-    random  = randomR (minBound,maxBound)
-
-instance Arbitrary Word32 where
-    arbitrary     = choose (minBound,maxBound)
-
 genUnicode :: IsString a => Gen a
 genUnicode = fmap fromString string where
     string = sized $ \n ->
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.