Skip to content

Commit bd24cac

Browse files
authored
Merge pull request #8105 from haskell/cabal-init-w-docs
add explanation for what -w does in init context
2 parents 24aa20f + cf7c6ee commit bd24cac

File tree

1 file changed

+5
-7
lines changed
  • cabal-install/src/Distribution/Client

1 file changed

+5
-7
lines changed

cabal-install/src/Distribution/Client/Setup.hs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ globalCommand commands = CommandUI {
360360
,multiOption "nix"
361361
globalNix (\v flags -> flags { globalNix = v })
362362
[
363-
noArg (Flag True) [] ["enable-nix"]
363+
noArg (Flag True) [] ["enable-nix"]
364364
"Enable Nix integration: run commands through nix-shell if a 'shell.nix' file exists",
365-
noArg (Flag False) [] ["disable-nix"]
365+
noArg (Flag False) [] ["disable-nix"]
366366
"Disable Nix integration"
367367
]
368368

@@ -2031,7 +2031,7 @@ initCommand = CommandUI {
20312031
commandSynopsis = "Create a new cabal package.",
20322032
commandDescription = Just $ \_ -> wrapText $
20332033
"Create a .cabal, CHANGELOG.md, minimal initial Haskell code and optionally a LICENSE file.\n"
2034-
++ "\n"
2034+
++ "\n"
20352035
++ "Calling init with no arguments runs interactive mode, "
20362036
++ "which will try to guess as much as possible and prompt you for the rest.\n"
20372037
++ "Non-interactive mode can be invoked by the -n/--non-interactive flag, "
@@ -2230,11 +2230,9 @@ initOptions _ =
22302230
(reqArg' "TOOL" (Flag . (:[]))
22312231
(fromFlagOrDefault []))
22322232

2233-
-- NB: this is a bit of a transitional hack and will likely be
2234-
-- removed again if `cabal init` is migrated to the v2-* command
2235-
-- framework
22362233
, option "w" ["with-compiler"]
2237-
"give the path to a particular compiler"
2234+
"give the path to a particular compiler. For 'init', this flag is used \
2235+
\to set the bounds inferred for the 'base' package."
22382236
IT.initHcPath (\v flags -> flags { IT.initHcPath = v })
22392237
(reqArgFlag "PATH")
22402238

0 commit comments

Comments
 (0)