Commit Graph

675 Commits

Author SHA1 Message Date
Huw Campbell
5478fc16cb
Merge pull request #354 from pcapriotti/topic/improve-readability
Improve readability of help text
2019-07-17 23:50:21 +10:00
Huw Campbell
f41e35ac36 Improve readability of help text
Union types, which are surrounded by either brackets or
parenthesis, shouldn't dangle both sides in the middle
of a line.

If we see a union, we should either fit it on the current
line, or start a new line, unless we're at the start of
the nesting group.
2019-07-17 23:49:16 +10:00
Huw Campbell
4a446427f5 Fix clunky prose 2019-07-10 23:08:14 +10:00
Huw Campbell
587c56083d
Remove ghc-8.8.1from allowed failures 2019-07-10 15:21:43 +10:00
Huw Campbell
114e6ecaf3
Merge pull request #351 from pcapriotti/topic/release-0.15.0
optparse-applicative 0.15.0 release
2019-07-05 18:58:04 +10:00
Huw Campbell
c2e62e4262 Prepare for release 2019-07-05 10:18:02 +10:00
Huw Campbell
6ff428bd33
Merge pull request #347 from pcapriotti/topic/long-equals
Topic/long equals
2019-07-05 10:08:24 +10:00
Huw Campbell
dbbd534a0c Don't write multiple equal signs 2019-07-05 09:53:46 +10:00
Ben Selfridge
bc29e669a5 Add Option to format long options with equals sign 2019-06-08 22:57:02 +10:00
Huw Campbell
83e096aa20 Small reformatting 2019-06-02 10:56:46 +10:00
Huw Campbell
aac5994ac8
Merge pull request #343 from phadej/haskell-ci
Use haskell-ci
2019-05-20 23:10:45 +10:00
Oleg Grenrus
7c9afeb503 .travis.yml: Re-enable GHC-7.0 and 7.2; add hlint run 2019-05-13 00:34:38 +03:00
Oleg Grenrus
9f90e4a41d Move library sources into src/
This will enable more easier hlinting on CI
2019-05-13 00:07:15 +03:00
Oleg Grenrus
ad2fa7f643 Add .hlint.yaml, fix some hlint warns, ignore others
Note: {-# ANN #-} start the GHCi interpreter (like TemplateHaskell!),
so I removed that.
2019-05-13 00:05:17 +03:00
Oleg Grenrus
ad70813194 Regenerate .travis.yml
Temporarily disable 7.0 and 7.2 jobs, as there aren't
ansi-wl-pprint-0.6.8 with 7.0/7.2 support
https://matrix.hackage.haskell.org/#/package/ansi-wl-pprint

I'll add it back, as soon as
https://github.com/feuerbach/ansi-terminal/pull/82
is decided upon
2019-05-11 00:10:23 +03:00
Oleg Grenrus
1a38782b12 Allow semigroups-0.19 and fix Monad(fail)
- semigroups-0.19 doesn't break anything in optparse-applicative
- fail isn't a method of Monad since base-4.13 (GHC-8.8)
  - Also the warning is removed, as it says
    -Wnoncanonical-monadfail-instances is deprecated: fail is no longer a method of Monad
2019-05-10 22:48:45 +03:00
Ian Grant Jeffries
512b7c1f79 Don't show help text on InfoMsg. 2019-03-15 21:24:55 +11:00
Huw Campbell
908356897a
Merge pull request #335 from pcapriotti/topic/rewire-tree
Fixes #307 and #220 
Thanks @benjaminselfridge for getting this going
2019-03-15 19:37:47 +10:00
Huw Campbell
0b83cf1099 Use tree to filter out optionals, instead of annotating the leaves 2019-03-15 20:22:09 +11:00
Huw Campbell
68bae8de5c Push bracket and parenthesis logic into the tree
Gives better rendering for optional alternatives
2019-03-15 20:22:03 +11:00
Ben Selfridge
e4e800c17d Code review fixes 2019-03-15 20:10:54 +11:00
Ben Selfridge
0f2c15ac7e Add new test cases for optional pair of arguments 2019-03-15 20:10:54 +11:00
Ben Selfridge
e34d4105c7 Fixed optional pair of arguments usage display bug - aka issue #307 2019-03-15 20:10:49 +11:00
Ben Selfridge
72b6e4a52c Relax Monoid constraint to Semigroup for the Monoid Chunk instance (#331)
* Relax Monoid constraint to Semigroup for the Monoid Chunk instance

* Bump lower bound of ansi-wl-pprint to be compatible with previous Monoid ->
Semigroup change

* Removed 7.0 and 7.2 from supported GHC versions
2019-02-28 10:52:50 +11:00
Paolo Capriotti
25dab7dfec Fix typo in a comment 2019-02-05 14:43:29 +01:00
Huw Campbell
730d00f921
Merge pull request #326 from pcapriotti/topic/ghc-8.6.3
Run test suite for 8.6.
2018-12-21 17:47:15 +11:00
Huw Campbell
3102fcb5e3
Run test suite for 8.6. 2018-12-21 13:31:04 +11:00
Huw Campbell
58a0065ae2
Merge pull request #325 from pcapriotti/topic/ghc-8.6.3
Add ghc 8.6.3 to builds
2018-12-19 21:46:05 +11:00
Huw Campbell
6a15655a82
Add ghc 8.6.3 to builds 2018-12-19 21:16:42 +11:00
Paolo Capriotti
9b9554f173 Improve CHANGELOG formatting and fix typos 2018-11-02 08:46:46 +00:00
Huw Campbell
2abc5b01ba
Merge pull request #318 from pcapriotti/topic/subparser-reimplementation-breaking
Allow inlining of subparsers instead of independent execution
2018-10-19 09:38:17 +11:00
Huw Campbell
5e377c0c26
Merge pull request #322 from pcapriotti/topic/prepare-release
Prepare for release
2018-10-04 11:19:44 +10:00
Huw Campbell
97dfe6da84 Prepare for release 2018-10-03 09:29:59 +10:00
Huw Campbell
08397b2506
Merge pull request #320 from pcapriotti/topic/QuickCheckbump
Bump QuickCheck
2018-09-27 16:05:23 +10:00
Huw Campbell
490a48fcda Bump QuickCheck 2018-09-27 10:33:26 +10:00
Huw Campbell
4205047d6f Export builder 2018-09-19 20:54:08 +10:00
Huw Campbell
48f4d7a743 Put inline behind an option to keep old behaviour by default 2018-09-19 19:00:07 +10:00
Huw Campbell
9108ccd1f6 Change how subparsers are executed:
Previously seachparser would return a Maybe a, which would then be
wrapped in a NilP . Just and swapped into the parser. This means
that subparsers needed to execute completely before returning, and
gives a somewhat unsatifactory notion of backtracking, where one
could supply commands to the top level, but only after fully
completing the subparser.

If instead of returning a Maybe a, we return a Maybe (Parse a) then
for flags, args, and options we can bahave the same and just wrap a
little earlier, but for subcommands we can do something a bit different
and replace the subparser with the contents of the selected command.

This means that we're essentially inlining the selected subparser,
and all parent options are still 'in scope' of the current parse.

Given that we can still enter the context (but not exit it), not much
changes with this, but backtracking is now quite different and can not
be turned off.
2018-09-19 19:00:07 +10:00
Huw Campbell
b04118b039
Merge pull request #316 from pcapriotti/topic/examples-cabal-fix
Topic/examples cabal fix
2018-09-11 09:46:02 +10:00
Huw Campbell
886bc367e9 Move inclusion of Examples to other modules 2018-09-10 11:52:44 +10:00
Huw Campbell
06ccfc3449
Merge pull request #308 from MyOde/patch-1
Readme Typo fix
2018-07-10 12:10:42 +10:00
MyOde
f35bb7ff2e
Readme Typo fix 2018-07-09 11:57:11 +03:00
Huw Campbell
c38c20fb91 Remove tryP, it's unused 2018-06-14 18:02:20 +10:00
Huw Campbell
49a1681475
Merge pull request #306 from pcapriotti/topic/reachable-fix
Don't set parsers to unreachable after a Command
2018-06-09 11:10:01 +10:00
Huw Campbell
7b2175bfc6 Fix suggestions test 2018-06-05 14:07:25 +10:00
Huw Campbell
d1c8396f59 Don't set parsers to unreachable after a Command
Commands aren't absorbing, and any value which isn't one of the
specified ones can be passed to a latter command or argument.
2018-06-05 11:14:50 +10:00
Huw Campbell
6b434fbfb0 Grammar 2018-05-23 09:14:16 +10:00
Huw Campbell
72ae4b6987
Merge pull request #293 from pcapriotti/topic/8.4-travis
Add 8.4.1 to travis build
2018-03-09 11:34:14 +11:00
Huw Campbell
650b125123
Add 8.4.1 to travis build 2018-03-09 07:58:00 +11:00
Huw Campbell
e01281b3e5
Merge pull request #292 from gwils/gitignore-new-build
Add new-build artifacts to .gitignore
2018-02-28 16:32:28 +11:00