{-# LANGUAGE CPP #-}

module Data.Aeson.Compat
  (
    fromStrict
  ) where

import qualified Data.ByteString      as S
import qualified Data.ByteString.Lazy as L

fromStrict :: S.ByteString -> L.ByteString
#if MIN_VERSION_bytestring(0, 9, 2)
fromStrict :: ByteString -> ByteString
fromStrict = [ByteString] -> ByteString
L.fromChunks ([ByteString] -> ByteString)
-> (ByteString -> [ByteString]) -> ByteString -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[])
#else
fromStrict = L.fromStrict
#endif