Commit Graph

337 Commits

Author SHA1 Message Date
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
mrkkrp
1896856e1c move fixity declaration for (<?>) where it belongs 2015-09-23 21:04:51 +06:00
mrkkrp
162e82c8e0 bump HUnit upper bound
Version 1.3.0.0 has been released and it seems to work OK.
2015-09-23 19:55:07 +06:00
mrkkrp
1617f9b1b8 even more cosmetic corrections
Make details consistent and fix some minor cosmetic issues.
2015-09-23 19:46:24 +06:00
mrkkrp
6627690363 fixed a typo in test for ‘updatePosString’
That typo was causing loop. Also, since we don't treat carriage return
specially, we can simplify the test a bit.
2015-09-23 18:59:24 +06:00
mrkkrp
3975ae52d0 cosmetic improvements, courtesy of @neongreen
Closes #37.

Most part of these changes is proposed by @neongreen. To apply precisely
what I deem acceptable, correct some of them in other way, and add some
other things, I've manually re-edited this.
2015-09-23 17:23:24 +06:00
mrkkrp
d0409a897e implemented flexible tab width
Closes #38.

Now tab width can be manipulated with via the following functions:

* ‘getTabWidth’
* ‘setTabWidth’

Other auxiliary changes were performed, such as updating of
‘updatePosChar’.

This also corrects a bit obsolete descriptions of some functions.
2015-09-23 16:47:17 +06:00
mrkkrp
38abf590db make ‘string'’ return actually parsed input
Closes #36.

We should try to preserve original information where possible. User then
can convert case of parsed string if necessary. Previous implementation
discarded actually parsed string and returned argument of the
function — this can be considered as data loss of a sort.
2015-09-23 11:43:58 +06:00
mrkkrp
9adf4c7d46 use constant instead of literal string 2015-09-23 11:13:22 +06:00
mrkkrp
fbc08037ba eliminate little used type synonyms
The type synonyms seem to be little used: ‘SourceName’, ‘Line’, and
‘Column’. They rather contaminate name space.
2015-09-23 11:10:22 +06:00