Skip to content

Commit

Permalink
Fix build of tests with GHC 7.0 (!)
Browse files Browse the repository at this point in the history
  • Loading branch information
bos committed Apr 5, 2015
1 parent e66786c commit e373471
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/QC/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ import qualified Data.Text.Lazy as TL
import qualified Data.Attoparsec.ByteString.Lazy as BL
import qualified Data.Attoparsec.Text.Lazy as TL

#if !MIN_VERSION_random(1,0,1)
instance Random Word8 where
randomR = integralRandomR
random = randomR (minBound,maxBound)

instance Arbitrary Word8 where
arbitrary = choose (minBound, maxBound)
#endif

parseBS :: BL.Parser r -> BL.ByteString -> Maybe r
parseBS p = BL.maybeResult . BL.parse p

Expand Down

0 comments on commit e373471

Please sign in to comment.