@@ -28,18 +28,8 @@ module Data.Aeson.Parser.Internal
2828 , eitherDecodeStrictWith
2929 ) where
3030
31−#if defined(USE_BLAZE_BUILDER)
32−import Blaze.ByteString.Builder (Builder, fromByteString, toByteString)
33−import Blaze.ByteString.Builder.Char.Utf8 (fromChar)
34−import Blaze.ByteString.Builder.Word (fromWord8)
35−#else
36−#if MIN_VERSION_bytestring(0,10,2)
3731import Data.ByteString.Builder
38−#else
39−import Data.ByteString.Lazy.Builder
40−#endif
4132 (Builder, byteString, toLazyByteString, charUtf8, word8)
42−#endif
4333
4434import Control.Applicative ((*>), (<$>), (<*), liftA2, pure)
4535import Data.Aeson.Types (Result(..), Value(..))
@@ -331,24 +321,9 @@ jsonEOF = json <* skipSpace <* endOfInput
331321jsonEOF' :: Parser Value
332322jsonEOF' = json' <* skipSpace <* endOfInput
333323
334−#if defined(USE_BLAZE_BUILDER)
335−byteString :: ByteString -> Builder
336−byteString = fromByteString
337−{-# INLINE byteString #-}
338−
339−charUtf8 :: Char -> Builder
340−charUtf8 = fromChar
341−{-# INLINE charUtf8 #-}
342−
343−word8 :: Word8 -> Builder
344−word8 = fromWord8
345−{-# INLINE word8 #-}
346−
347−#else
348324toByteString :: Builder -> ByteString
349325toByteString = L.toStrict . toLazyByteString
350326{-# INLINE toByteString #-}
351−#endif
352327
353328peekWord8' :: A.Parser Word8
354329#if MIN_VERSION_attoparsec(0,11,1)