on master help sign in
Merge
commite132650b8c8c9d182d0b0afb1af27eaf29855fc0 authorBryan O'Sullivan <bos@serpentine.com> dateSun 13 Oct 2013, 21:41 (13 years ago) parente193cb92b9ca16
1 file changed+3−6
Data/Aeson/Parser/Internal.hs+3−6
Data/Aeson/Parser/Internal.hs+3−6
@@ -279,12 +279,9 @@ eitherDecodeWith p to s =
279279eitherDecodeStrictWith :: Parser Value -> (Value -> Result a) -> B.ByteString
280280 -> Either String a
281281eitherDecodeStrictWith p to s =
282− case A.parse p s of
283− A.Done _ v -> case to v of
284− Success a -> Right a
285− Error msg -> Left msg
286− A.Fail _ _ msg -> Left msg
287− A.Partial _ -> Left "incomplete input"
282+ case either Error to (A.parseOnly p s) of
283+ Success a -> Right a
284+ Error msg -> Left msg
288285{-# INLINE eitherDecodeStrictWith #-}
289286
290287-- $lazy