Skip to content

Commit e99557b

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 e99557b

File tree

2 files changed

+242
-188
lines changed

2 files changed

+242
-188
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,17 @@ 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
78+
rtsOptionsStanza = mkRtsOptionsStanza opts
7679

7780
libStanza <- prepareLibTarget opts libTarget
7881
exeStanza <- prepareExeTarget opts exeTarget
7982
testStanza <- prepareTestTarget opts testTarget
8083

8184
(reusedCabal, cabalContents) <-
8285
writeCabalFile opts $
83-
pkgFields ++ [commonStanza, libStanza, exeStanza, testStanza]
86+
pkgFields ++ [extensionsStanza, ghcOptionsStanza, rtsOptionsStanza, commonStanza, libStanza, exeStanza, testStanza]
8487

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

0 commit comments

Comments
 (0)