@@ -86,6 +86,7 @@ import Data.Word (Word8, Word16, Word32, Word64)
8686import Data.Version (Version, showVersion, parseVersion)
8787import Text.ParserCombinators.ReadP (readP_to_S)
8888import Foreign.Storable (Storable)
89+import Numeric.Natural (Natural)
8990import Prelude hiding (foldr)
9091import qualified Data.Aeson.Encode.Builder as E
9192import qualified Data.Aeson.Parser.Time as Time
@@ -111,7 +112,6 @@ import qualified Data.Vector.Storable as VS
111112import qualified Data.Vector.Unboxed as VU
112113
113114#if MIN_VERSION_base(4,8,0)
114−import Numeric.Natural
115115#else
116116import Control.Applicative ((<$>), (<*>), pure)
117117import Data.Monoid (mempty)
@@ -353,7 +353,6 @@ instance FromJSON Integer where
353353 parseJSON = withScientific "Integral" $ pure . truncate
354354 {-# INLINE parseJSON #-}
355355
356−#if MIN_VERSION_base(4,8,0)
357356instance ToJSON Natural where
358357 toJSON = toJSON . toInteger
359358 {-# INLINE toJSON #-}
@@ -366,7 +365,6 @@ instance FromJSON Natural where
366365 if Scientific.coefficient s < 0
367366 then fail $ "Expected a Natural number but got the negative number: " <> show s
368367 else pure $ truncate s
369−#endif
370368
371369instance ToJSON Int8 where
372370 toJSON = Number . fromIntegral