Commit Graph

577 Commits

Author SHA1 Message Date
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
Artyom
935f3eeecc Fix the explanation for 'try' 2015-09-23 10:57:47 +06:00
Artyom
a7d96ce56b Update .gitignore 2015-09-23 00:08:58 +03:00
mrkkrp
de63d7a0ad fixed a couple of typos in comments 2015-09-22 23:30:54 +06:00
mrkkrp
75eb620de0 fixed typos in ‘README.md’ 2015-09-22 17:36:21 +06:00
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
4a2aedb8c1 add link to Parsec repository in ‘README.md’ 2015-09-21 23:26:25 +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
5ba4fa8060 updated ‘README.md’ file
Note that we have Hackage badge here, although we haven't uploaded the
library yet. This is put here in advance because the badge is created
only after uploading but then it's too late to attach it. Oh.
2015-09-21 21:42:10 +06:00
mrkkrp
f8a02e25ea minor (mainly cosmetic) corrections 2015-09-21 21:40:27 +06:00
Mark Karpov
5140f3039d Merge pull request #33 from neongreen/master
Add some tests for monad transformers (see #27)
2015-09-21 19:30:06 +05:00