Commit Graph

50 Commits

Author SHA1 Message Date
mrkkrp
1285699b74 Improve coverage of older primitives 2016-02-18 00:12:27 +06:00
Herbert Valerio Riedel
ba9bd6a25e Define MonadFail & Semigroup instances
This also enables the respective warnings flags in dev mode
to help megaparsec remain forward compatible.

The dependencies on `semigroup` and `fail` are conditional on
`impl(ghc >= 8)` and avoid CPP and conditionally defined instances
(which would result in an conditional API).
2016-02-08 11:38:10 +01:00
mrkkrp
174c02ce38 Add ‘< 0.6’ constraint to ‘transformers’ 2016-02-08 13:37:30 +06:00
mrkkrp
e1be100bd6 Cosmetic whims
Can't help it…
2016-02-08 13:36:39 +06:00
mrkkrp
e5ad380832 Remove redundant mode annotations 2016-01-25 12:56:41 +06:00
mrkkrp
f69661a930 Drop some upper bounds (‘transformers’ and ‘text’) 2016-01-13 15:00:15 +06:00
mrkkrp
7f505384df Version bump (4.3.0) 2016-01-09 19:15:12 +06:00
mrkkrp
e5508941c8 Add year 2016 to copyright notices 2016-01-09 18:56:33 +06:00
mrkkrp
27f0b706b7 only use ‘-Werror’ on travis 2015-12-23 18:42:00 +06:00
mrkkrp
f699958d12 add ‘-Werror’ GHC option 2015-12-22 12:55:05 +06:00
mrkkrp
fff87d05e8 include ‘README.md’ file in distribution 2015-11-04 13:19:21 +06:00
mrkkrp
1ce2a807d8 give Cabal something it can understand 2015-10-30 21:41:21 +06:00
mrkkrp
f7f3b02e45 uppercase disclaimer in license
Otherwise it may look like “fine print” for some. Crazy…
2015-10-30 19:43:34 +06:00
mrkkrp
c7ed5fe909 after some consulting, it should be “FreeBSD”
What Parsec used is called “FreeBSD” or “BSD 2 clause”. Addition of the
third clause may require contacting all the authors. To hell with it,
let it be “FreeBSD” (which is anyway better than “BSD-like”), I'm a
hacker, not a lawyer (tm).
2015-10-30 17:26:45 +06:00
mrkkrp
04634fdf10 restore Cabal's ability to parse ‘license’ field 2015-10-30 14:16:44 +06:00
mrkkrp
503a1db4be clarify used license and add missing clause
This commit clarifies license of the software replacing “BSD3” with more
conventional “BSD 3 clause”.

Another change is addition of the third clause originally missing in
license of Parsec (which is licensed under BSD 2 clause license). The
addition of the third clause in form:

* Neither the names of the copyright holders nor the names of
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

does not violate original BSD 2 clause license effectively making it BSD
3 clause license (which I find preferable).
2015-10-30 13:52:30 +06:00
mrkkrp
0472ab6ae5 bump version in Cabal file 2015-10-26 14:32:11 +06:00
mrkkrp
ec6098c7ac various whims 2015-10-25 22:20:05 +06:00
mrkkrp
8dce9cdc5d bump version 2015-10-20 16:40:41 +06:00
mrkkrp
69eabcca37 bump version 4.1.0 2015-10-14 18:18:50 +06:00
mrkkrp
fd56f0c82c shorten description of Megaparsec in ‘.cabal’ file 2015-10-10 20:48:23 +06:00
Benjamin Kaestner
19c276c80d Lower lower bounds of base version 2015-10-03 17:00:30 +02:00
mrkkrp
64053a60bd remove obsolete information from ‘.cabal’ file 2015-10-01 16:59:38 +06: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
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
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
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
dbfa03221c correct ‘lookAhead’ and ‘notFollowedBy’
…for some instances of ‘MonadParsec’.
2015-09-21 15:31:19 +06:00
mrkkrp
ce1655c980 some transformers are instances of ‘MonadParsec’
In particular:

* ‘Lazy.StateT’
* ‘Strict.StateT’
* ‘ReaderT’
* ‘Lazy.WriterT’
* ‘Strict.WriterT’
* ‘IndentityT’
2015-09-20 15:21:35 +06:00
mrkkrp
0d39e44f40 Merge branch 'new-lexer' 2015-09-13 21:16:39 +06:00
Auke Booij
a7fbf2fe04 Add a few synthetic benchmarks
This code benchmarks the "string" primitive and various non-primitive combinators.
The code coverage of these benchmarks is not 100%: new benchmarks should be added
as relevant performance questions are discovered.
2015-09-10 18:11:46 +02:00
mrkkrp
7298c01387 first version of the new lexer module 2015-09-08 17:34:02 +06:00
mrkkrp
b6a43c3335 started work on new lexer
Eliminated ‘Text.Megaparsec.Language’ module because at this point it is
clear that already existing definitions are of little use in
Megaparsec. I started writing “default” language definition in
‘Text.Megaparsec.Lexer’.

At this point it should be possible to parse languages where indentation
matters, although we will need to provide more helpers to make it
easier.
2015-09-06 15:23:12 +06:00
mrkkrp
2ca6316f33 renamed ‘Text.Megaparsec.Token’ module
Now it's called ‘Text.Megaparsec.Lexer’. This commit contains other
cosmetic changes as well.
2015-08-30 16:00:07 +06:00
mrkkrp
b35ecbc31f added tests for ‘Text.Megaparsec.Expr’
The single test covers 100 % of the module's code. However it doesn't
check quality of error messages, so we still have room for improvement.

Manual tests show that error messages are good.
2015-08-29 22:24:55 +06:00
mrkkrp
3850c64416 correct a typo and clean up description 2015-08-26 17:57:33 +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
987381eaa7 derive ‘Monoid’ instance for ‘Hints’ 2015-08-20 01:37:58 +06:00
mrkkrp
1ecaeef075 refreshed description of the package in .cabal file 2015-08-18 02:15:35 +06:00
mrkkrp
3daa70f15a representation of tokens in error messages, fixed #12
* Type class ‘ShowToken’ introduced to pretty-print tokens.

* For now, we have defined instances for ‘String’ and ‘Char’.
2015-08-06 16:37:08 +06:00
mrkkrp
274eca9706 renamed ‘oldtests’ → ‘old-tests’ for readability 2015-08-03 13:23:52 +06:00
mrkkrp
3ef5e5e621 renamed ‘MegaParsec’ → ‘Megaparsec’, close #10 2015-08-01 22:24:45 +06:00
mrkkrp
e46ba8db05 added benchmarks (empty for now) 2015-07-31 20:12:56 +06:00
mrkkrp
5459bf05e0 specified versions of ‘base’ for tests 2015-07-31 20:06:07 +06:00
mrkkrp
ec57da40b0 reorganized tests 2015-07-31 18:59:26 +06:00
mrkkrp
f346063cc1 reordered copyright notices 2015-07-31 17:44:27 +06:00
mrkkrp
137ce0a521 refactoring, phase 2 2015-07-29 14:44:58 +06:00
mrkkrp
227667f829 refactoring, phase 1 2015-07-28 19:32:19 +06:00