@@ -279,11 +279,9 @@ decodeWith p to s =
279decodeStrictWith :: Parser Value -> (Value -> Result a) -> B.ByteString
279decodeStrictWith :: Parser Value -> (Value -> Result a) -> B.ByteString
280 -> Maybe a
280 -> Maybe a
281decodeStrictWith p to s =
281decodeStrictWith p to s =
282− case A.parse p s of
282+ case either Error to (A.parseOnly p s) of
283− A.Done _ v -> case to v of
284− Success a -> Just a
283+ Success a -> Just a
286− _ -> Nothing
284+ Error _ -> Nothing
287{-# INLINE decodeStrictWith #-}
285{-# INLINE decodeStrictWith #-}
289eitherDecodeWith :: Parser Value -> (Value -> Result a) -> L.ByteString
287eitherDecodeWith :: Parser Value -> (Value -> Result a) -> L.ByteString