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
5aff6e3986
Mention ambiguous type variables and type signatures
...
Close #157 .
2016-12-26 13:45:31 +03:00
mrkkrp
7505174218
Minor improvements in the docs of ‘Text.Megaparsec.Lexer’ module
2016-12-11 13:23:01 +03:00
mrkkrp
4de9da0bbc
Fix a typo in the test suite
2016-11-25 18:09:37 +03:00
mrkkrp
86cca77cf5
Update docs for ‘charLiteral’ to mention ‘\&’
...
Close #154 .
2016-11-24 20:08:54 +03:00
Mark Karpov
dd2386aafc
Add ‘MonadParsec’ instance for ‘RWST’ ( #152 )
2016-11-21 19:18:27 +04:00
mrkkrp
38f5b36d46
A minor correction in the ‘README.md’ file
2016-10-12 12:33:01 +03:00
Erik de Castro Lopo
56b72c8a68
Remove un-needed unsafeCoerce ( #149 )
...
`Pos` is a newtype wrapper around `Word` and the `unsafePos` function
is marked `INLINE`, so `unsafeCoerce` is complete overkill.
2016-10-10 12:29:40 +04:00
mrkkrp
a0dad30be1
Allow ‘hspec-expectations-0.8.0’
2016-10-09 15:51:06 +03:00
mrkkrp
fdc4f8071f
Version bump (5.1.2), update ‘CHANGELOG.md’
2016-10-06 22:46:30 +03: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
f0a0c70a35
Version bump (5.1.1)
2016-10-04 10:07:10 +03:00
mrkkrp
d1649b63ad
Export ‘observing’ from ‘Text.Megaparsec’
2016-10-04 10:07:06 +03:00
mrkkrp
70e1de679f
Mention the ‘observing’ primitive in ‘README.md’
2016-10-03 12:45:03 +03:00
mrkkrp
1539b713e3
Version bump (5.1.0)
2016-10-03 12:37:38 +03:00
mrkkrp
dcf484889d
Increase coverage
2016-10-03 12:37:30 +03:00
Mark Karpov
5a1ebb1375
Merge pull request #146 from mrkkrp/add-observing-primitive
...
Add the ‘observing’ primitive
2016-10-03 11:30:49 +04:00
mrkkrp
3a147e6cde
Add tests for the new ‘observing’ primitive
2016-10-02 19:38:50 +03:00
mrkkrp
97257f3c7f
Add the ‘observing’ primitive
...
Close #145 .
2016-10-02 19:38:50 +03:00
mrkkrp
de4338ed2c
Mention the new ‘dbg’ function in ‘CHANGELOG.md’
2016-10-02 19:36:34 +03:00
Mark Karpov
55b7c8c61b
Merge pull request #144 from mrkkrp/add-debugging-primitive
...
Add debugging primitive
2016-09-30 19:09:48 +04:00
mrkkrp
4e3a36ef93
Add tests for the new ‘dbg’ function
2016-09-30 13:35:02 +03:00
mrkkrp
01f828e5dd
Add debugging primitive ‘dbg’
2016-09-30 13:34:58 +03:00
mrkkrp
b335c0f78a
Use ‘lts-7.1’ resolver
2016-09-27 12:17:38 +03:00
mrkkrp
9fd109d0e8
Improve coverage of some primitives
2016-09-27 11:42:13 +03:00
mrkkrp
4bc14d6668
Improve descriptions of backtracking primitives
...
Close #143 .
2016-09-27 10:03:43 +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
979e7d504a
A minor update to ‘CHANGELOG.md’
2016-09-25 21:38:50 +03:00
mrkkrp
4667c9ff46
Fix test coverage reporting
2016-09-25 21:23:57 +03:00
Mark Karpov
735776519c
Merge pull request #138 from mrkkrp/migrate-to-hspec
...
Re-write the tests with Hspec and more
2016-09-25 22:07:52 +04: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
mrkkrp
31785909ee
Add a link to the text of original announcement
2016-09-18 21:20:37 +03:00
mrkkrp
dab99997f4
Add a notice about performance tutorial
2016-09-18 21:18:27 +03:00
mrkkrp
9305b26f39
Add ‘cassava-megaparsec’ to list of related libs
2016-09-18 19:13:40 +03:00
mrkkrp
be4478b840
Clarify behavior of ‘many’ and ‘some’
...
See #141 .
2016-09-18 14:34:27 +03:00
mrkkrp
486d90c45c
Use a newer resolver (‘lts-6.15’)
2016-09-04 16:49:35 +03:00
mrkkrp
e8174d4700
Add some ‘Arbitrary’ instances
2016-09-04 16:44:24 +03:00
mrkkrp
5478537cf7
Eliminate the ‘old-tests’ test suite
2016-09-04 16:33:40 +03:00
mrkkrp
badec4a9df
Expose the ‘parseErrorTextPretty’ function
...
Close #137 .
2016-09-04 14:48:40 +03:00
Albert Krewinkel
c234586435
Reflect renaming of alphaNum in docs ( #136 )
...
The `alphaNum` parser was renamed to `alphaNumChar`, yet the docs
weren't full updated to reflect this change.
2016-08-27 16:44:55 +04:00
mrkkrp
82994e45d4
Allow line comments end with end of input
...
Close #119 .
2016-08-13 20:00:49 +03:00
mrkkrp
ee5f126c14
Use LTS 6.11 resolver
2016-08-13 19:46:20 +03:00
mrkkrp
c4e1259cb9
Add a couple of articles into the docs
2016-08-13 19:22:33 +03:00
mrkkrp
6a7c41d889
Don't allow very big values of ‘Pos’ in tests
...
This is unrealistic and leads to false failures.
2016-08-04 09:38:54 +03:00
mrkkrp
38dd2112e3
Mention how to deal with case described in #129
...
Close #130 .
2016-08-01 22:00:36 +03:00
mrkkrp
33098be1ea
Define ‘displayException’ for ‘ParseError’
2016-07-29 21:27:52 +03:00