Commit Graph

125 Commits (ce3875d1fddf60127b52cfed1f5b79885cf3c793)

Author SHA1 Message Date
Lennart Spitzner ce3875d1fd Stop using Semigroups.Option 2022-12-14 17:53:45 +01:00
Lennart Spitzner 751ac69eaf Bump bounds for ghc-9.0 2022-12-14 15:02:47 +01:00
Lennart Spitzner 4f169af01c Bump to 2.0.0.0, Append changelog, Update readme 2022-12-14 15:02:47 +01:00
Lennart Spitzner 5486bf0737 Make examples non-buildable without new flag butcher-examples 2022-12-14 15:02:47 +01:00
Lennart Spitzner 9fc7d27fc0 Add example for butcher+barbies usage 2022-12-14 15:02:47 +01:00
Lennart Spitzner 071eacccfc Clean up existing examples, Remove redundant function
mainFromCmdParserWithHelpDesc is no longer required, because
peekCmdDesc can be used at the top-level to access the full
CmdDesc value. The knot-tying implementation is no longer
required either.
2022-12-14 15:02:47 +01:00
Lennart Spitzner 91d57b07c4 Clean up haddocks 2022-12-14 15:02:47 +01:00
Lennart Spitzner b4dc827b6e Update examples / Put examples in components 2022-12-14 15:02:47 +01:00
Lennart Spitzner 5d67167c87 Major changeset: Add applicative, Refactor monadic interface
- monadic interface now uses two-phase setup: First step is to create a
  full CommandDesc value, second is running the parser on input while the
  CommandDesc is chained along
- applicative interface has a somewhat nicer/cleaner implementation, is
  more secure by avoiding any demands on the API user that are not encoded
  in types, but is slightly less expressive and requires ApplicativeDo to
  get readable code.
- The applicative interface is *NOT* finished and the test-suite does not
  cover it.
- Add the `traverseBarbie` construct which introduces a dependency on
  the `barbies` library. This also effectively:
- Stop support for ghc < 8.4.
- Refactor the module structure a bit, and change the API of the central
  `runCmdParser` function. It now returns a `PartialParseInfo`. Essentially,
  `runCmdParser` is a combination of the previous `runCmdParser` and the
  previous `simpleCompletion`. This API design is a curious advantage to
  laziness: Returning a complex struct is harmless as fields that the user
  does not use won't be evaluated. The downside is that the core function now
  looks like a complex beast, but the upside is that there is no need to
  expose multiple functions that are supposed to be chained in a certain way
  to get all functionality (if desired), and we still _can_ provide simpler
  versions that are just projections on the `PartialParseInfo`.
- Stop support for an anti-feature: The implicit merging of multiple
  sub-commands definitions with the same name.
2022-12-14 15:02:47 +01:00
Lennart Spitzner 6eb306cfd0 Switch to new seaaye setup 2022-12-14 15:02:47 +01:00
Lennart Spitzner afb2a42e96 Fix/Upgrade/Improve nix expressions 2020-08-23 17:11:38 +02:00
Lennart Spitzner ad17fe7763 Drop support for ghc<8.4 2020-06-10 21:59:50 +02:00
Lennart Spitzner 585294f3a3 Bump to 1.3.3.2, Add changelog 2020-06-10 12:18:06 +02:00
Lennart Spitzner c23c53fe25 Fix another duplicated desc bug 2020-06-10 12:18:06 +02:00
Lennart Spitzner c29ef0cce2 Fix duplicated desc-parts bug 2020-06-09 17:18:27 +02:00
Lennart Spitzner f2f3688149 Add nix expressions 2020-06-09 00:13:03 +02:00
Lennart Spitzner 9d0fb2a268 Fix cabal file: missing include-dirs for test-suite 2020-06-09 00:07:42 +02:00
Lennart Spitzner f8d5c529ec
Merge pull request #6 from igrep/master
Build with GHC 8.10
2020-06-09 00:07:11 +02:00
YAMAMOTO Yuji 206a9bfae1
Build with GHC 8.10
I confirmed the tests pass
2020-05-16 17:55:19 +09:00
Lennart Spitzner 32eaf60e63 Bump to 1.3.3.1 2020-04-11 23:37:50 +02:00
Lennart Spitzner aaa83ee100 Undo prematurely exposed modules / bad cabal file 2020-04-11 23:37:05 +02:00
Lennart Spitzner c3d1b141a8 Bump to 1.3.3.0, Add changelog 2020-04-11 23:36:09 +02:00
Lennart Spitzner bb646321fe Add the descendDescTo function, minor formatting 2020-04-10 23:40:21 +02:00
Lennart Spitzner 34d94c2d2e Fix buggy handling of defaults on CmdParserPart 2020-04-10 23:34:26 +02:00
Lennart Spitzner ded3192962 Simplify/Clean up prelude.inc 2020-04-10 23:31:47 +02:00
Lennart Spitzner d4b3555b77 Add more tests for params with/without defaults 2020-04-10 23:29:24 +02:00
Lennart Spitzner 707050f881 Add rtsopts flag to test-suite 2020-04-10 23:29:06 +02:00
Lennart Spitzner ead94b5b23
Merge pull request #5 from ndmitchell/patch-1
Permit extra-1.7
2020-03-15 22:40:33 +01:00
Neil Mitchell 564cc9097d
Permit extra-1.7 2020-03-14 16:28:12 +00:00
Lennart Spitzner 9b69fdc1b1 Bump bound for ghc-8.8 2019-09-29 19:25:06 +02:00
Lennart Spitzner 64615f9a40 Bump to 1.3.2.3, Fix deque dependency bounds 2019-06-09 20:41:59 +02:00
Lennart Spitzner ad5ef2e675 Fix building with deque>=0.3 2019-06-09 20:41:33 +02:00
Lennart Spitzner 3b0bd3dfeb iridium.yaml: Enable testing with stackage 2019-06-09 20:40:59 +02:00
Lennart Spitzner 2982d12339 Update iridium.yaml to up-to-date ghc versions 2019-06-08 22:32:37 +02:00
Lennart Spitzner 3429a11ff8 Bump deque bound, Update copyright 2019-06-08 22:32:12 +02:00
Lennart Spitzner 19b458cfce Bump to 1.3.2.2 2018-12-02 14:34:40 +01:00
Lennart Spitzner 593d903a53 Fix too-shallow descs for "siblings" 2018-12-02 14:08:09 +01:00
Lennart Spitzner 6e70709e67 Bump to 1.3.2.1 2018-10-07 16:06:18 +02:00
Lennart Spitzner 71441b3c2b Re-enable ghc-8.6, Add -Wcompat 2018-10-07 16:06:07 +02:00
Lennart Spitzner 516b975ac7 Switch to latest deque version 2018-10-07 16:05:38 +02:00
Lennart Spitzner 2262d4c955 Strengthen upper bound due to duplicate instances 2018-10-05 10:32:38 +02:00
Lennart Spitzner 08913d94ac Disable testing of 8.6 for the time being 2018-10-03 22:21:02 +02:00
Lennart Spitzner c16eefdb0e Fix some -Wcompat issues (MFP) 2018-10-03 22:08:09 +02:00
Lennart Spitzner 1eb489489d Bump to 1.3.2.0, changelog 2018-10-03 22:06:17 +02:00
Lennart Spitzner 8b12f38d6b Expose things properly (missing re-exports) 2018-10-03 22:06:17 +02:00
Lennart Spitzner 131216d4f4 Fix bug in simpleCompletion 2018-10-03 22:06:17 +02:00
Lennart Spitzner f756d4fb55 Revert base bump; broken with 8.6.1 after all 2018-10-03 22:03:06 +02:00
Lennart Spitzner 481d6a1905 Relax upper bounds for ghc-8.6 compat 2018-07-10 17:49:37 +02:00
Lennart Spitzner 4661f8dd48 Bump iridium.yaml to use ghc-8.4.3 2018-07-10 14:42:28 +02:00
Lennart Spitzner 39e8c8cc2e Relax upper bound to "free < 5.2" 2018-07-10 14:32:04 +02:00