mrkkrp
dcc53ad0b7
improved error messages for labelled ‘many’
...
Closes #35 .
Since ‘many’ (and thus ‘some’) are the only combinator that can succeed
consuming input and produce hints at the same time we can conclude that
‘cok'’ continuation in ‘pLabel’ combinator is only called when ‘many’ is
labelled. By correcting label in this case prepending the phrase “rest
of ” to actual label we can greatly improve result error message.
2015-09-22 15:09:40 +06:00
mrkkrp
1e66bf7d3d
at attempt to reduce repetition
...
Not sure if it actually makes it better. Sometimes I miss certain
features of languages like Common Lisp.
2015-09-21 23:12:17 +06:00
mrkkrp
f8a02e25ea
minor (mainly cosmetic) corrections
2015-09-21 21:40:27 +06:00
Artyom
3f23081f60
Add some tests for monad transformers (see #27 )
2015-09-21 17:05:41 +03:00
mrkkrp
5242b8d5fd
minor changes in tests to make them compile
...
Recent changes (mainly eliminating of built-in backtracking user state)
require some changes in the tests.
2015-09-18 15:41:18 +06:00
mrkkrp
2fc5455591
make ‘Text.Megaparsec.Prim.token’ more flexible
...
Closes #29 .
Now testing function can return ‘Either [Message] a’ so it can construct
full list of error messages. This may be useful in some cases when
tokens are more complex than simple characters.
2015-09-14 14:15:31 +06:00
mrkkrp
6ac08b0956
added new parser ‘string'’
...
This is like ‘string’, but is case-insensitive.
2015-09-04 18:12:59 +06:00
mrkkrp
8b05353a32
new test to check that ‘hidden’ always works
2015-08-29 16:03:41 +06:00
mrkkrp
49e80775ef
added test to catch bugs similar to #25
2015-08-26 16:15:30 +06:00
mrkkrp
a891ff6522
improved tests for ‘(<|>)’
...
Fixed a detail in existing test ‘prop_alternative_1’ and added new test
‘prop_alternative_2’ to directly catch bugs like #23 . Re-indexed some
tests.
2015-08-24 16:35:58 +06:00
mrkkrp
7dd2ad94ff
minor corrections
2015-08-22 15:02:34 +06:00
mrkkrp
aa4189f4bc
move test helpers to ‘Util’ module
...
So we can reuse them to test other modules.
2015-08-22 02:46:13 +06:00
mrkkrp
85be098854
more tests for ‘Text.Megaparsec.Prim’
...
Added test for the following primitive combinators:
* ‘lookAhead’
* ‘token’
* ‘tokens’
2015-08-22 01:13:20 +06:00
mrkkrp
24afab66c8
more tests for ‘Text.Megaparsec.Prim’
...
Combinator-specific tests added:
* ‘label’
* ‘hidden’
* ‘try’
* ‘lookAhead’
* ‘notFollowedBy’
2015-08-21 20:21:55 +06:00
mrkkrp
816da3d682
tests for ‘Text.Megaparsec.Prim’ written
...
More tests need to be written, especially for primitive
combinators. This commit also improves testing utilities and refactors
some stuff.
2015-08-20 17:12:44 +06:00
mrkkrp
866bcdec58
some tests written
2015-08-03 13:19:23 +06:00