on master help sign in
Fix benchmarks with older bytestring'
3ac700dBryan O'Sullivan
benchmarks/haskell/Benchmarks/Pure.hs+3−1
@@ -4,7 +4,7 @@
4--
4--
5-- * Most pure functions defined the string types
5-- * Most pure functions defined the string types
6--
6--
7−{-# LANGUAGE BangPatterns, GADTs, MagicHash #-}
7+{-# LANGUAGE BangPatterns, CPP, GADTs, MagicHash #-}
8{-# OPTIONS_GHC -fno-warn-orphans #-}
8{-# OPTIONS_GHC -fno-warn-orphans #-}
9module Benchmarks.Pure
9module Benchmarks.Pure
10 ( benchmark
10 ( benchmark
@@ -425,11 +425,13 @@ benchmark fp = do
425 replicat n = concat . L.replicate n
425 replicat n = concat . L.replicate n
426 short = T.pack "short"
426 short = T.pack "short"
427
427
428+#if !MIN_VERSION_bytestring(0,10,0)
428instance NFData BS.ByteString
429instance NFData BS.ByteString
429
430
430instance NFData BL.ByteString where
431instance NFData BL.ByteString where
431 rnf BL.Empty = ()
432 rnf BL.Empty = ()
432 rnf (BL.Chunk _ ts) = rnf ts
433 rnf (BL.Chunk _ ts) = rnf ts
434+#endif
433
435
434data B where
436data B where
435 B :: NFData a => a -> B
437 B :: NFData a => a -> B