This package provides an alternative approach for white space consuming to Text.Megaparsec.Char.Lexer.
WARNING this package is under implementation. Bugs are very likely here. All behavior is instable, don't rely on any version policy.
At the moment Text.Megaparsec.Char.Lexer.New
provides combinators mostly like
standard megaparsec lexer does with the following differences:
- there is a special
newtype
for line space consumers and a type synonym for the space and eols consumers indentBlock
replaced by a more flexibleblock
andheadedBlock
combinatorslineFold
behavior changed
In general, new approach impose more restrictions on how white space should be consumed. In my experience not enough clear rules leads here to bugs so I'd like to restrict them. However, I don't think current implementation to be the only right, so I'd like to consider any other proposals and maybe change the lib's behavior.
Just import Text.Megaparsec.Char.Lexer.New
instead of
Text.Megaparsec.Char.Lexer
--- all you need is exported from there.
Issues (bugs, feature requests or otherwise feedback) may be reported in the GitHub issue tracker.
Pull requests are also welcome.