@@ -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