-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and improve list parser of cabal init cli (#8663)
* Fix cli list parse errors in `cabal init` Occurrences of `Flag [a]` behave in a slightly unexpected way. The monoid instance of `Flag` is right associative and discard the value on the left. Thus, make sure we merge the contents of the flags, instead of using the monoid instance of `Flag` itself. * Document fixes and improvements Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6fb48c7
commit 8aad429
Showing
4 changed files
with
195 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
synopsis: Fix and improve list parser of cabal init cli | ||
packages: cabal-install | ||
prs: #8663 | ||
issues: #8659 | ||
|
||
description: { | ||
Occurrences of 'Flag [a]' seem to behave in an unexpected way. The monoid | ||
instance of 'Flag' is right associative and discard the value on the | ||
left, but we want to merge the contents of 'Flag'. | ||
|
||
Permits: | ||
- cabal init -d base -d vector -d containers | ||
|
||
Fixes for all Flag '[a]' the cli parser in cabal init. Adds cli parser tests. | ||
|
||
Adds the feature to specify a comma-separated list of dependencies: | ||
- cabal init -d base,vector,containers | ||
|
||
} |