Commit Graph

14 Commits

Author SHA1 Message Date
Tomáš Janoušek
4147b2b103 Make indentBlock/IndentNone work with many like IndentMany/Some does (#161)
Even though the haddock for ‘Text.Megaparsec.Lexer.space’ says that

    Parsing of white space is an important part of any parser. We
    propose a convention where every lexeme parser assumes no spaces
    before the lexeme and consumes all spaces after the lexeme;

all the indentation-sensitive parsing combinators assume/consume whitespace
_before_ the thing to be parsed. This would normally mean they can't be used
with combinators like ‘many’ and ‘some’ without using ‘try’ (and sacrificing
performance). Fortunately ‘indentBlock’ also consumes whitespace _after_,
but unfortunately it didn't do that in the ‘IndentNone’ case. Now it does
and it works with many and some without try!
2016-12-28 02:12:57 +04:00
Mark Karpov
08d1ae8e61 Allow ‘many’ run parsers that do not consume input (#160) 2016-12-26 16:49:48 +04:00
mrkkrp
4de9da0bbc Fix a typo in the test suite 2016-11-25 18:09:37 +03:00
Mark Karpov
dd2386aafc Add ‘MonadParsec’ instance for ‘RWST’ (#152) 2016-11-21 19:18:27 +04:00
mrkkrp
e6c5c2beed Fix building with QuickCheck older than 2.9.0 2016-10-06 22:37:40 +03:00
mrkkrp
0367967161 Avoid flood of debugging info on testing 2016-10-06 22:30:28 +03:00
mrkkrp
dcf484889d Increase coverage 2016-10-03 12:37:30 +03:00
mrkkrp
3a147e6cde Add tests for the new ‘observing’ primitive 2016-10-02 19:38:50 +03:00
mrkkrp
4e3a36ef93 Add tests for the new ‘dbg’ function 2016-09-30 13:35:02 +03:00
mrkkrp
9fd109d0e8 Improve coverage of some primitives 2016-09-27 11:42:13 +03:00
mrkkrp
6772b88e93 Make ‘try’ truly backtrack parser state
Close #142.

This seemingly has no effect on performance.
2016-09-27 09:41:23 +03:00
mrkkrp
dfbc6f0893 Minor corrections in test suite, improve coverage 2016-09-27 00:23:17 +03:00
mrkkrp
bd07032795 Fix the build 2016-09-25 18:42:21 +03:00
mrkkrp
6da7f86350 Migrate the test suite to Hspec 2016-09-24 19:32:50 +03:00