@@ -44,6 +44,7 @@ module Data.Aeson.Types.Internal
4444 , parseEither
4545 , parseMaybe
4646 , liftP2
47+ , (<*>+)
4748 , modifyFailure
4849 , parserThrowError
4950 , parserCatchError
@@ -339,7 +340,8 @@ apP d e = do
339340 return (b a)
340341{-# INLINE apP #-}
341342
342−-- | A variant of 'liftA2' that lazily accumulates errors from both subparsers.
343+-- | A variant of 'Control.Applicative.liftA2' that lazily accumulates errors
344+-- from both subparsers.
343345liftP2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c
344346liftP2 f pa pb = Parser $ \path kf ks ->
345347 runParser pa path
@@ -347,6 +349,13 @@ liftP2 f pa pb = Parser $ \path kf ks ->
347349 (\a -> runParser pb path kf (\b -> ks (f a b)))
348350{-# INLINE liftP2 #-}
349351
352+infixl 4 <*>+
353+
354+-- | A variant of ('<*>') that lazily accumulates errors from both subparsers.
355+(<*>+) :: Parser (a -> b) -> Parser a -> Parser b
356+(<*>+) = liftP2 id
357+{-# INLINE (<*>+) #-}
358+
350359-- | A JSON \"object\" (key\/value map).
351360type Object = HashMap Text Value
352361