Understanding the API

Main Classes and Packages

In parsley, everything resides within the parsley package, and the major entry point is parsley.Parsley. There are a few modules of note:

Using parsley.token for Lexing

Unlike Haskell libraries like megaparsec and parsec, parsley does not tie the lexing functionality to the Haskell Report, instead supporting a superset of the functionality. The functionality is provided to the user by Lexer, and this must be provided an value of type LexicalDesc, which provides all the configuration necessary to describe the language and make the parsers.