Commit Graph

346 Commits

Author SHA1 Message Date
mrkkrp
48528af655 various changes in ‘Text.Megaparsec.Error’
Close #62.

Apart from some refactoring, the following important changes were
introduced:

* ‘ParseError’ is now a monoid.

* Added functions ‘addErrorMessages’ and ‘newErrorMessages’.
2015-10-21 19:36:43 +06:00
mrkkrp
8356a05919 made interface of ‘Text.Megaparsec.Pos’ smarter
Now it's impossible to create ‘SourcePos’ with non-positive line number
or column number. Unfortunately we cannot use ‘Numeric.Natural’ because
we need to support older versions of ‘base’.
2015-10-21 17:33:29 +06:00
mrkkrp
bedad01d98 cosmetic improvements 2015-10-20 22:10:52 +06:00
mrkkrp
706e267295 run 1000 tests when testing locally 2015-10-20 17:09:08 +06:00
mrkkrp
84223f2947 fix failing tests for ‘sepEndBy’ and ‘sepEndBy1’ 2015-10-20 16:50:33 +06:00
mrkkrp
8dce9cdc5d bump version 2015-10-20 16:40:41 +06:00
mrkkrp
f3be336ebe fix implementation of ‘sepEndBy’ and ‘sepEndBy1’
Fixes #63.

Deprecation notes were removed and new tests written.
2015-10-20 16:37:24 +06:00
mrkkrp
a27dfa6229 minor cosmetic correction 2015-10-18 16:39:07 +06:00
mrkkrp
ef3223dc8a travis: fail if some functions are undocumented 2015-10-18 14:58:21 +06:00
mrkkrp
4d60e82be8 updated ‘README.md’ file
It seems like there won't be official Megaparsec tutorial for a
while. Also, the text is now written in such manner so it can be used on
Megaparsec site without any additional corrections.
2015-10-18 14:37:19 +06:00
mrkkrp
e6affc5a1c stack support 2015-10-17 19:25:10 +06:00
mrkkrp
cc22bc40a9 minor cosmetic corrections
Got a whim to re-indent text with Emacs ‘fill-paragraph’.
2015-10-17 14:06:10 +06:00
Mark Karpov
b93bedccf2 Merge pull request #60 from bkaestner/master
Improve README
2015-10-17 10:08:32 +05:00
Benjamin Kästner
8586ebf653 Add missing articles and fix some grammar
This commit mainly adds missing "a", "an" or "the", whenever something is used in singular, for example:

- user will see the label in error message
+ the user will see the label in the error message

In some cases, I've removed a word, for example "module" after `Text.Megaparsec.Char`, since it's clear you're talking about a module (otherwise "the" before the module name would be necessary).

This should provide a more fluid reading experience.
2015-10-16 22:44:36 +02:00
mrkkrp
3e5dc6d5a4 improve wording in doc-string for ‘charLiteral’ 2015-10-16 16:31:22 +06:00
mrkkrp
81b0081028 add missing ‘L.’ in doc-string of ‘signed’ 2015-10-16 15:57:46 +06:00
mrkkrp
9e1cac87b8 removed redundant labels in ‘Text.Megaparsec.Char’
This is handled by ‘showToken’ in ‘char’ anyway, so there is no need to
label these things manually.
2015-10-16 15:01:35 +06:00
mrkkrp
2b6df377ef a minor cosmetic change in ‘tests/Expr.hs’ 2015-10-16 00:01:15 +06:00
mrkkrp
79ceb7962f eliminate indentation in error messages
Indented text returned by ‘showMessages’ may be undesirable, but we
cannot add indentation outside of the function (edge case: strings
including newline are displayed in the messages).
2015-10-15 15:12:28 +06:00
mrkkrp
69eabcca37 bump version 4.1.0 2015-10-14 18:18:50 +06:00
mrkkrp
b062a397ee made format of error messages conventional
Closes #56.

In particular, file name and textual position are represented like this:

  filename.hs:5:6:
    error message

This format should be more conventional, so various tools will be able
to parse it and provide some support (for example, Emacs can work with
this format).
2015-10-14 17:48:44 +06:00
mrkkrp
fd56f0c82c shorten description of Megaparsec in ‘.cabal’ file 2015-10-10 20:48:23 +06:00
mrkkrp
a9421728d6 typos and corrections 2015-10-10 20:45:27 +06:00
mrkkrp
e954316804 updated ‘README.md’ file 2015-10-10 20:14:48 +06:00
mrkkrp
a70e07a408 do not export ‘Consumed’ and ‘Reply’
‘Text.Megaparsec’ and ‘Text.Megaparsec.Prim’ do not export these data
types and their constructors anymore. These data types are rather
low-level implementation detail that should not be visible to
end-user. They are also subject to certain changes in future.
2015-10-06 22:36:59 +06:00
mrkkrp
f0874ae8ad a couple of cosmetic corrections 2015-10-05 00:27:34 +06:00
mrkkrp
1d0e390593 fixed test for ‘Text.Megaparsec.Char.string'’
Closes #52.

Also added one new test for that function. The test is courtesy of
Benjamin Kästner (@bkaestner).
2015-10-05 00:10:59 +06:00
mrkkrp
17ba4fb4ee update changelog (GHC 7.6 is supported now) 2015-10-04 21:09:01 +06:00
mrkkrp
5f83b40631 make Travis CI build Megaparsec with GHC 7.6.x
There are some problems with HPC in GHC 7.6.x, so we don't measure code
coverage.
2015-10-04 20:49:42 +06:00
Mark Karpov
9e445f844b Merge pull request #50 from bkaestner/base-4600
Add base-4.6.0.x compatiblity
2015-10-04 14:39:10 +05:00
Benjamin Kaestner
19c276c80d Lower lower bounds of base version 2015-10-03 17:00:30 +02:00
Benjamin Kaestner
a8bfdf9f56 Add #if for Data.Either isRight and isLeft 2015-10-03 17:00:29 +02:00
Benjamin Kaestner
3078c04f8f Add #if for bool in tests 2015-10-03 17:00:29 +02:00
Benjamin Kaestner
65aa745a58 Add #if for bool :: a -> a -> Bool -> a. 2015-10-03 16:52:20 +02:00
mrkkrp
64053a60bd remove obsolete information from ‘.cabal’ file 2015-10-01 16:59:38 +06:00
mrkkrp
706ff2b964 update changelog 2015-10-01 15:55:38 +06:00
mrkkrp
63f0ff3653 extend the list of contributors
Add Benjamin Kästner.
2015-10-01 15:54:43 +06:00
mrkkrp
b7f394839d add more Cabal/GHC combinations to test
Because of added support for GHC 7.8.x we need to test that version too.
2015-10-01 15:35:29 +06:00
Mark Karpov
4c5c3d8362 Merge pull request #45 from bkaestner/base-4700
Add compatibility to GHC 7.8.x
2015-10-01 13:05:13 +05:00
Benjamin Kaestner
d97398a016 Add compatibility to base-4.7.0.x
This patch introduces compatibility to base-4.7.0.x. It was tested
on Win 8.1 x86_64, using GHC 7.8.4. It mainly consists of a bunch
of #if !MIN_VERSION(4,8,0) ... #endif additions and a lower bound
on base in the cabal file as well as a general introduction of the
CPP extension via default-extensions.

It also removes a potential error source in tests/Util.hs, since
the backslash in /=\ can lead to strange quirks on certain systems
(backslash and newline only separated by whitespace).

Other, squashed commits:

- Remove 'recent version of base' from Readme

- Change necessary version of GHC
2015-09-30 20:18:25 +02:00
Mark Karpov
664742788a Merge pull request #44 from neongreen/patch-1
Fix a typo (reponsibilitity → responsibility)
2015-09-30 18:17:17 +05:00
Artyom
5efa258644 reponsibilitity → responsibility 2015-09-30 16:09:08 +03:00
Mark Karpov
7d12bfb3b7 Merge pull request #41 from mlang/fix/typo
Fix another typo.
2015-09-30 12:41:57 +05:00
Mario Lang
f68dedb354 Fix another typo. 2015-09-29 23:40:02 +02:00
Mark Karpov
37b8b93643 Merge pull request #40 from mlang/fix/typo
Fix a typo.
2015-09-30 01:48:58 +05:00
Mario Lang
50d631bdc2 Fix a typo. 2015-09-29 22:41:53 +02:00
mrkkrp
321b781e29 refresh values of “Portability” field
‘Text.Megaparsec.Prim’ cannot be considered portable since it uses
multi-parameter type classes and functional dependencies.

Other modules that depend on these non-portable features from
‘Text.Megaparsec.Prim’ should be considered non-portable too.
2015-09-27 14:46:12 +06:00
mrkkrp
319addf767 use ‘ExistentialQuantification’ locally
Only in module ‘Text.Megaparsec.Perm’ where it is necessary.
2015-09-27 14:27:01 +06:00
mrkkrp
664e17959d add new modules to ‘.cabal’ file 2015-09-25 12:35:50 +06:00
mrkkrp
9774ed9de9 rename ‘parse'’ → ‘parseMaybe’ 2015-09-24 17:13:06 +06:00