git.iko.soy/typeable/attoparsec
on master help sign in
Fix build of tests with GHC 7.0 (!)
commite373471d9291c8328873fd8fd16ff4ec0c0c7cc9 authorBryan O'Sullivan <bos@serpentine.com> dateSun 5 Apr 2015, 12:39 (12 years ago) parente66786c
1 file changed+9
tests/QC/Common.hs+9
tests/QC/Common.hs+9
@@ -28,6 +28,15 @@ import qualified Data.Text.Lazy as TL
2828import qualified Data.Attoparsec.ByteString.Lazy as BL
2929import qualified Data.Attoparsec.Text.Lazy as TL
3030
31+#if !MIN_VERSION_random(1,0,1)
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+#endif
39+
3140parseBS :: BL.Parser r -> BL.ByteString -> Maybe r
3241parseBS p = BL.maybeResult . BL.parse p
3342