File tree 2 files changed +7
-2
lines changed 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ Other enhancements:
83
83
* Stack parses and respects the ` preferred-versions ` information from
84
84
Hackage for choosing latest version of a package in some cases,
85
85
e.g. ` stack unpack packagename ` .
86
+ * The components output in the ` The main module to load is ambiguous ` message
87
+ now include package names so they can be more easily copy-pasted.
86
88
* Git repos are shared across multiple projects. See
87
89
[ #3551 ] ( https://github.com/commercialhaskell/stack/issues/3551 )
88
90
* Use en_US.UTF-8 locale by default in pure Nix mode so programs won't
Original file line number Diff line number Diff line change @@ -561,10 +561,13 @@ figureOutMainFile bopts mainIsTargets targets0 packages = do
561
561
wantedPackageComponents bopts target (ghciPkgPackage pkg)
562
562
renderCandidate c@ (pkgName,namedComponent,mainIs) =
563
563
let candidateIndex = T. pack . show . (+ 1 ) . fromMaybe 0 . elemIndex c
564
+ pkgNameText = T. pack (packageNameString pkgName)
564
565
in candidateIndex candidates <> " . Package `" <>
565
- T. pack (packageNameString pkgName) <>
566
+ pkgNameText <>
566
567
" ' component " <>
567
- renderComp namedComponent <>
568
+ -- This is the format that can be directly copy-pasted as
569
+ -- an argument to `stack ghci`.
570
+ pkgNameText <> " :" <> renderComp namedComponent <>
568
571
" with main-is file: " <>
569
572
T. pack (toFilePath mainIs)
570
573
candidateIndices = take (length candidates) [1 :: Int .. ]
You can’t perform that action at this time.
0 commit comments