Source

aeson / benchmarks / CompareWithJSON.hs

The default branch has multiple heads

Diff from to

File benchmarks/CompareWithJSON.hs

+{-# LANGUAGE CPP #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 
 import Blaze.ByteString.Builder (toLazyByteString)
 import Criterion.Main
 import qualified Data.Aeson as A
 import qualified Data.ByteString.Lazy as BL
+import qualified Text.JSON as J
+
+#if !MIN_VERSION_bytestring(0,10,0)
 import qualified Data.ByteString.Lazy.Internal as BL
-import qualified Text.JSON as J
+
+instance NFData BL.ByteString where
+  rnf (BL.Chunk _ bs) = rnf bs
+  rnf BL.Empty        = ()
+#endif
 
 instance (NFData v) => NFData (J.JSObject v) where
   rnf o = rnf (J.fromJSObject o)
   rnf (J.JSArray lst) = rnf lst
   rnf (J.JSObject o) = rnf o
 
-instance NFData BL.ByteString where
-  rnf (BL.Chunk _ bs) = rnf bs
-  rnf BL.Empty        = ()
-
 decodeJ :: String -> J.JSValue
 decodeJ s =
   case J.decodeStrict s of