From a4359d2c67811e71368524d17aeb3809dae657da Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 18 Jan 2017 20:13:45 -0500 Subject: Backported to older bytestring. --- src/Data/BEncode/Types.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Data/BEncode/Types.hs') diff --git a/src/Data/BEncode/Types.hs b/src/Data/BEncode/Types.hs index 15f570f..c1e1f01 100644 --- a/src/Data/BEncode/Types.hs +++ b/src/Data/BEncode/Types.hs @@ -7,6 +7,7 @@ -- -- Types for working with bencode data. -- +{-# LANGUAGE CPP #-} module Data.BEncode.Types ( -- * Types BInteger @@ -51,6 +52,11 @@ data BValue | BDict BDict -- ^ bencode key-value dictionary. deriving (Show, Read, Eq, Ord) +#if !MIN_VERSION_bytestring(0,10,0) +instance NFData ByteString where + rnf s = seq s () +#endif + instance NFData BValue where rnf (BInteger i) = rnf i rnf (BString s) = rnf s -- cgit v1.2.3