[commit: packages/binary] master: Conditionally instantiate NFData depending on bytestring version. (036b34f)

git at git.haskell.org git at git.haskell.org
Sun Dec 14 17:55:27 UTC 2014


Repository : ssh://git@git.haskell.org/binary

On branch  : master
Link       : http://git.haskell.org/packages/binary.git/commitdiff/036b34f0ec8cac8c1284eb2031ebac8835a0775b

>---------------------------------------------------------------

commit 036b34f0ec8cac8c1284eb2031ebac8835a0775b
Author: Lennart Kolmodin <kolmodin at google.com>
Date:   Thu Sep 25 17:21:26 2014 +0400

    Conditionally instantiate NFData depending on bytestring version.
    
    Should fix #61.


>---------------------------------------------------------------

036b34f0ec8cac8c1284eb2031ebac8835a0775b
 benchmarks/Builder.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/benchmarks/Builder.hs b/benchmarks/Builder.hs
index 151d282..042b371 100644
--- a/benchmarks/Builder.hs
+++ b/benchmarks/Builder.hs
@@ -19,8 +19,10 @@ import Data.Word (Word8)
 
 import Data.Binary.Builder
 
-#if __GLASGOW_HASKELL__ < 706
+#if !MIN_VERSION_bytestring(0,10,0)
 instance NFData S.ByteString
+instance NFData L.ByteString where
+  rnf = rnf . L.toChunks
 #endif
 
 main :: IO ()



More information about the ghc-commits mailing list