@@ -271,7 +271,7 @@ prop_composite_case b (W w) = w < 0x8000 ==>
271271 putWord16be 15 w
272272 g = do v <- getBool
273273 case v of
274− True -> getWord16be 15
274+ True -> getWord16 15
275275 False -> do
276276 msb <- getWord8 7
277277 lsb <- getWord8 8
@@ -395,7 +395,7 @@ type Program = [Primitive]
395395instance Arbitrary Primitive where
396396 arbitrary = do
397397 let gen c = do
398− let (maxBits, _) = (\w -> (bitSize w, c undefined w)) undefined
398+ let (maxBits, _) = (\w -> (finiteBitSize w, c undefined w)) undefined
399399 bits <- choose (0, maxBits)
400400 n <- choose (0, fromIntegral (2^bits-1))
401401 return (c bits n)
@@ -458,9 +458,9 @@ getPrimitive p =
458458 case p of
459459 Bool _ -> Bool <$> getBool
460460 W8 n _ -> W8 n <$> getWord8 n
461− W16 n _ -> W16 n <$> getWord16be n
462− W32 n _ -> W32 n <$> getWord32be n
463− W64 n _ -> W64 n <$> getWord64be n
461+ W16 n _ -> W16 n <$> getWord16 n
462+ W32 n _ -> W32 n <$> getWord32 n
463+ W64 n _ -> W64 n <$> getWord64 n
464464 BS n _ -> BS n <$> getByteString n
465465 LBS n _ -> LBS n <$> getLazyByteString n
466466 IsEmpty -> isEmpty >> return IsEmpty
@@ -474,9 +474,9 @@ verifyProgram totalLength ps0 = go 0 ps0
474474 case p of
475475 Bool x -> check x getBool >> go (pos+1) ps
476476 W8 n x -> check x (getWord8 n) >> go (pos+n) ps
477− W16 n x -> check x (getWord16be n) >> go (pos+n) ps
478− W32 n x -> check x (getWord32be n) >> go (pos+n) ps
479− W64 n x -> check x (getWord64be n) >> go (pos+n) ps
477+ W16 n x -> check x (getWord16 n) >> go (pos+n) ps
478+ W32 n x -> check x (getWord32 n) >> go (pos+n) ps
479+ W64 n x -> check x (getWord64 n) >> go (pos+n) ps
480480 BS n x -> check x (getByteString n) >> go (pos+(8*n)) ps
481481 LBS n x -> check x (getLazyByteString n) >> go (pos+(8*n)) ps
482482 IsEmpty -> do