Skip to content

Commit

Permalink
Document fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Jan 16, 2023
1 parent a93a7cd commit 3fa83f9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cabal-install/src/Distribution/Client/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2247,12 +2247,12 @@ initOptions _ =
(flagElim [] (fmap prettyShow)))

, option ['d'] ["dependency"]
"Package dependency."
"Package dependencies. Permits comma separated list of dependencies."
IT.dependencies
(\v flags -> flags { IT.dependencies =
mergeListFlag (IT.dependencies flags) v })
(reqArg "PACKAGE" (fmap Flag dependenciesReadE)
(fmap prettyShow . fromFlagOrDefault []))
(reqArg "DEPENDENCIES" (fmap Flag dependenciesReadE)
(fmap prettyShow . fromFlagOrDefault []))

, option [] ["application-dir"]
"Directory containing package application executable."
Expand Down
18 changes: 18 additions & 0 deletions changelog.d/pr-8663
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
synopsis: Fix and improve list parser of cabal init cli
packages: cabal-install
prs: #8663

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

}

0 comments on commit 3fa83f9

Please sign in to comment.