@@ -86,6 +86,7 @@ import Data.Aeson.Internal.Functions (mapKey)
8686import Data.Aeson.Parser.Internal (eitherDecodeWith, jsonEOF)
8787import Data.Aeson.Types.Generic
8888import Data.Aeson.Types.Internal
89+import Data.Aeson.AccParser
8990import Data.Attoparsec.Number (Number(..))
9091import Data.Bits (unsafeShiftR)
9192import Data.Fixed (Fixed, HasResolution)
@@ -606,7 +607,7 @@ parseJSON2 = liftParseJSON2 parseJSON parseJSONList parseJSON parseJSONList
606607
607608-- | Helper function to use with 'liftParseJSON'. See 'Data.Aeson.ToJSON.listEncoding'.
608609listParser :: (Value -> Parser a) -> Value -> Parser [a]
609−listParser f (Array xs) = fmap V.toList (accumulateTraverseVector f xs)
610+listParser f (Array xs) = getParser $ V.toList <$> traverse (AccParser . f) xs
610611listParser _ v = typeMismatch "[a]" v
611612{-# INLINE listParser #-}
612613
@@ -1529,7 +1530,7 @@ instance (FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Sum f g a) where
15291530instance FromJSON1 Seq.Seq where
15301531 liftParseJSON p _ = withArray "Seq a" $
15311532 fmap Seq.fromList .
1532− accumulateSequenceList . zipWith (parseIndexedJSON p) [0..] . V.toList
1533+ accSequence . zipWith (parseIndexedJSON p) [0..] . V.toList
15331534 {-# INLINE liftParseJSON #-}
15341535
15351536instance (FromJSON a) => FromJSON (Seq.Seq a) where
@@ -1607,7 +1608,7 @@ instance FromJSONKey UUID.UUID where
16071608
16081609instance FromJSON1 Vector where
16091610 liftParseJSON p _ = withArray "Vector a" $
1610− accumulateTraverseVector (uncurry $ parseIndexedJSON p) . V.indexed
1611+ accTraverse (uncurry $ parseIndexedJSON p) . V.indexed
16111612 {-# INLINE liftParseJSON #-}
16121613
16131614instance (FromJSON a) => FromJSON (Vector a) where