Skip to content

Commit 43dc598

Browse files
committed
Reword common stanzas in the cabal file generated by cabal init
Following #11231, this commit reworks the common stanzas present in the cabal file generated by `cabal init`.
1 parent 8365cec commit 43dc598

File tree

2 files changed

+241
-188
lines changed

2 files changed

+241
-188
lines changed

cabal-install/src/Distribution/Client/Init/FileCreators.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,16 @@ writeProject (ProjectSettings opts pkgDesc libTarget exeTarget testTarget)
7373

7474
let pkgFields = mkPkgDescription opts pkgDesc
7575
commonStanza = mkCommonStanza opts
76+
extensionsStanza = mkExtensionsStanza opts
77+
ghcOptionsStanza = mkGhcOptionsStanza opts
7678

7779
libStanza <- prepareLibTarget opts libTarget
7880
exeStanza <- prepareExeTarget opts exeTarget
7981
testStanza <- prepareTestTarget opts testTarget
8082

8183
(reusedCabal, cabalContents) <-
8284
writeCabalFile opts $
83-
pkgFields ++ [commonStanza, libStanza, exeStanza, testStanza]
85+
pkgFields ++ [extensionsStanza, ghcOptionsStanza, commonStanza, libStanza, exeStanza, testStanza]
8486

8587
when (null $ _pkgSynopsis pkgDesc) $
8688
message opts T.Warning "No synopsis given. You should edit the .cabal file and add one."

0 commit comments

Comments
 (0)