A Parser for Things is a function from Strings to Lists of Pairs of Things and Strings!
The quote can be found on: seuss! and also you can observe the image here:
The majority of tutorials, blog posts, and general information around the web related to Haskell’s Parser Monads always goes back to the paper: Monadic Parsing in Haskell (by Graham Hutton and Erik Meijer). Like mentioned on the abstract, it’s a tutorial on how to define recursive descent parsers in Haskell, making use of the structuring capabilities of the language (coff coff Monads). This paper has literally my age (it was published in 1998), and one could confirm that it has indeed aged quite gracefully. Although the code associated with the paper still probably runs with some help, it is a bit outdated in regards to modern Haskell. If curious about what can be done about this topic using modern Haskell I can advise on some tutorials:
- Revisiting ‘Monadic Parsing in Haskell’ by Vaibhav Sagar
- Parser Combinators in Haskell (on Serokell companie’s blog)
- Parser Combinators: a Walkthrough
- CSE230 Wi13 - Monadic Parsing (UCSanDiego class on monadic parsing)
- JSON parsing from scratch in haskell by Abhinav Sarkar
This library is a small project of mine with the intention of learning and using to implement my interpreters/compilers/etc… It will probably be always a bit unstable and suffer weird changes. If you want an actual industry standard parser of this kind you should look for: megaparsec, parsec or the microscopic version: yoctoparsec!