Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- parseJSONValid :: Validity a => Parser a -> Parser a
- parseJSONValidWith :: Validity a => (value -> Parser a) -> value -> Parser a
Documentation
parseJSONValid :: Validity a => Parser a -> Parser a Source #
Modify a parser to fail on invalid results.
parseJSONValidWith :: Validity a => (value -> Parser a) -> value -> Parser a Source #
Modify a parsing function to fail on invalid results.
Easy to use with the withX
helper functions:
parseJSON = parseJSONValidwith . withObject "MyThing" $ \o -> MyThing <$> ...