diff --git a/.gitignore b/.gitignore index 628bbd917e7..4d1334d64e3 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,5 @@ bench.html # ignore the downloaded binary files scripts/release/binary-downloads/ + +tests/fixtures diff --git a/cabal-install/src/Distribution/Client/Init/FileCreators.hs b/cabal-install/src/Distribution/Client/Init/FileCreators.hs index 15a03c8a7d0..73070ca091d 100644 --- a/cabal-install/src/Distribution/Client/Init/FileCreators.hs +++ b/cabal-install/src/Distribution/Client/Init/FileCreators.hs @@ -73,6 +73,9 @@ writeProject (ProjectSettings opts pkgDesc libTarget exeTarget testTarget) let pkgFields = mkPkgDescription opts pkgDesc commonStanza = mkCommonStanza opts + extensionsStanza = mkExtensionsStanza opts + ghcOptionsStanza = mkGhcOptionsStanza opts + rtsOptionsStanza = mkRtsOptionsStanza opts libStanza <- prepareLibTarget opts libTarget exeStanza <- prepareExeTarget opts exeTarget @@ -80,7 +83,7 @@ writeProject (ProjectSettings opts pkgDesc libTarget exeTarget testTarget) (reusedCabal, cabalContents) <- writeCabalFile opts $ - pkgFields ++ [commonStanza, libStanza, exeStanza, testStanza] + pkgFields ++ [extensionsStanza, ghcOptionsStanza, rtsOptionsStanza, commonStanza, libStanza, exeStanza, testStanza] when (null $ _pkgSynopsis pkgDesc) $ message opts T.Warning "No synopsis given. You should edit the .cabal file and add one." diff --git a/cabal-install/src/Distribution/Client/Init/Format.hs b/cabal-install/src/Distribution/Client/Init/Format.hs index ced1f74cf81..98ea5a522ab 100644 --- a/cabal-install/src/Distribution/Client/Init/Format.hs +++ b/cabal-install/src/Distribution/Client/Init/Format.hs @@ -26,6 +26,9 @@ module Distribution.Client.Init.Format , mkExeStanza , mkTestStanza , mkPkgDescription + , mkExtensionsStanza + , mkGhcOptionsStanza + , mkRtsOptionsStanza ) where import Distribution.CabalSpecVersion @@ -133,72 +136,132 @@ mkCommonStanza opts = case specHasCommonStanzas $ _optCabalSpec opts of [text "warnings"] [field "ghc-options" text "-Wall" [] False opts] +mkGhcOptionsStanza :: WriteOpts -> PrettyField FieldAnnotation +mkGhcOptionsStanza opts = case specHasCommonStanzas $ _optCabalSpec opts of + NoCommonStanzas -> PrettyEmpty + _ -> + PrettySection + annNoComments + "common" + [text "ghc-options"] + [ field "ghc-options" text "-Wall -Widentities -Wcompat" [] False opts + ] + +mkRtsOptionsStanza :: WriteOpts -> PrettyField FieldAnnotation +mkRtsOptionsStanza opts = case specHasCommonStanzas $ _optCabalSpec opts of + NoCommonStanzas -> PrettyEmpty + _ -> + PrettySection + annNoComments + "common" + [text "rts-options"] + [ field "ghc-options" text "-rtsopts -threaded \"-with-rtsopts=-N -T\"" [] False opts + ] + +mkExtensionsStanza :: WriteOpts -> PrettyField FieldAnnotation +mkExtensionsStanza opts = case specHasCommonStanzas $ _optCabalSpec opts of + NoCommonStanzas -> PrettyEmpty + _ -> + PrettySection + annNoComments + "common" + [text "extensions"] + [ field "default-extensions" text "" [] False opts + , field "default-language" text "GHC2021" [] False opts + ] + +insertCommonStanzas :: WriteOpts -> [PrettyField FieldAnnotation] +insertCommonStanzas opts = + case specHasCommonStanzas $ _optCabalSpec opts of + NoCommonStanzas -> [PrettyEmpty] + _ -> + [ field + "import" + (hsep . map text) + ["extensions"] + ["Common language extensions"] + False + opts + , field + "import" + (hsep . map text) + ["ghc-options"] + ["Common compiler warnings and optimisations"] + False + opts + ] + +insertRtsOptionsStanza :: WriteOpts -> [PrettyField FieldAnnotation] +insertRtsOptionsStanza opts = + case specHasCommonStanzas $ _optCabalSpec opts of + NoCommonStanzas -> [PrettyEmpty] + _ -> + [ field + "import" + (hsep . map text) + ["rts-options"] + ["Common RTS options"] + False + opts + ] mkLibStanza :: WriteOpts -> LibTarget -> PrettyField FieldAnnotation mkLibStanza opts (LibTarget srcDirs lang expMods otherMods exts deps tools) = PrettySection annNoComments (toUTF8BS "library") [] - [ case specHasCommonStanzas $ _optCabalSpec opts of - NoCommonStanzas -> PrettyEmpty - _ -> - field - "import" - (hsep . map text) - ["warnings"] - ["Import common warning flags."] - False - opts - , field - "exposed-modules" - formatExposedModules - (toList expMods) - ["Modules exported by the library."] - True - opts - , field - "other-modules" - formatOtherModules - otherMods - ["Modules included in this library but not exported."] - True - opts - , field - "other-extensions" - formatOtherExtensions - exts - ["LANGUAGE extensions used by modules in this package."] - True - opts - , field - "build-depends" - formatDependencyList - deps - ["Other library packages from which modules are imported."] - True - opts - , field - "hs-source-dirs" - formatHsSourceDirs - (makeSymbolicPath <$> srcDirs) - ["Directories containing source files."] - True - opts - , field - (buildToolTag opts) - formatDependencyList - tools - ["Extra tools (e.g. alex, hsc2hs, ...) needed to build the source."] - False - opts - , field - "default-language" - id - lang - ["Base language which the package is written in."] - True - opts - ] + ( insertCommonStanzas opts + ++ [ field + "exposed-modules" + formatExposedModules + (toList expMods) + ["Modules exported by the library."] + True + opts + , field + "other-modules" + formatOtherModules + otherMods + ["Modules included in this library but not exported."] + True + opts + , field + "other-extensions" + formatOtherExtensions + exts + ["LANGUAGE extensions used by modules in this package."] + True + opts + , field + "build-depends" + formatDependencyList + deps + ["Other library packages from which modules are imported."] + True + opts + , field + "hs-source-dirs" + formatHsSourceDirs + (makeSymbolicPath <$> srcDirs) + ["Directories containing source files."] + True + opts + , field + (buildToolTag opts) + formatDependencyList + tools + ["Extra tools (e.g. alex, hsc2hs, ...) needed to build the source."] + False + opts + , field + "default-language" + id + lang + ["Base language which the package is written in."] + True + opts + ] + ) mkExeStanza :: WriteOpts -> ExeTarget -> PrettyField FieldAnnotation mkExeStanza opts (ExeTarget exeMain appDirs lang otherMods exts deps tools) = @@ -206,66 +269,59 @@ mkExeStanza opts (ExeTarget exeMain appDirs lang otherMods exts deps tools) = annNoComments (toUTF8BS "executable") [exeName] - [ case specHasCommonStanzas $ _optCabalSpec opts of - NoCommonStanzas -> PrettyEmpty - _ -> - field - "import" - (hsep . map text) - ["warnings"] - ["Import common warning flags."] - False - opts - , field - "main-is" - unsafeFromHs - exeMain - [".hs or .lhs file containing the Main module."] - True - opts - , field - "other-modules" - formatOtherModules - otherMods - ["Modules included in this executable, other than Main."] - True - opts - , field - "other-extensions" - formatOtherExtensions - exts - ["LANGUAGE extensions used by modules in this package."] - True - opts - , field - "build-depends" - formatDependencyList - deps - ["Other library packages from which modules are imported."] - True - opts - , field - "hs-source-dirs" - formatHsSourceDirs - (makeSymbolicPath <$> appDirs) - ["Directories containing source files."] - True - opts - , field - (buildToolTag opts) - formatDependencyList - tools - ["Extra tools (e.g. alex, hsc2hs, ...) needed to build the source."] - False - opts - , field - "default-language" - id - lang - ["Base language which the package is written in."] - True - opts - ] + ( insertCommonStanzas opts + ++ insertRtsOptionsStanza opts + ++ [ field + "main-is" + unsafeFromHs + exeMain + [".hs or .lhs file containing the Main module."] + True + opts + , field + "other-modules" + formatOtherModules + otherMods + ["Modules included in this executable, other than Main."] + True + opts + , field + "other-extensions" + formatOtherExtensions + exts + ["LANGUAGE extensions used by modules in this package."] + True + opts + , field + "build-depends" + formatDependencyList + deps + ["Other library packages from which modules are imported."] + True + opts + , field + "hs-source-dirs" + formatHsSourceDirs + (makeSymbolicPath <$> appDirs) + ["Directories containing source files."] + True + opts + , field + (buildToolTag opts) + formatDependencyList + tools + ["Extra tools (e.g. alex, hsc2hs, ...) needed to build the source."] + False + opts + , field + "default-language" + id + lang + ["Base language which the package is written in."] + True + opts + ] + ) where exeName = pretty $ _optPkgName opts @@ -275,73 +331,76 @@ mkTestStanza opts (TestTarget testMain dirs lang otherMods exts deps tools) = annNoComments (toUTF8BS "test-suite") [suiteName] - [ case specHasCommonStanzas $ _optCabalSpec opts of - NoCommonStanzas -> PrettyEmpty - _ -> - field - "import" - (hsep . map text) - ["warnings"] - ["Import common warning flags."] - False - opts - , field - "default-language" - id - lang - ["Base language which the package is written in."] - True - opts - , field - "other-modules" - formatOtherModules - otherMods - ["Modules included in this executable, other than Main."] - True - opts - , field - "other-extensions" - formatOtherExtensions - exts - ["LANGUAGE extensions used by modules in this package."] - True - opts - , field - "type" - text - "exitcode-stdio-1.0" - ["The interface type and version of the test suite."] - True - opts - , field - "hs-source-dirs" - formatHsSourceDirs - (makeSymbolicPath <$> dirs) - ["Directories containing source files."] - True - opts - , field - "main-is" - unsafeFromHs - testMain - ["The entrypoint to the test suite."] - True - opts - , field - "build-depends" - formatDependencyList - deps - ["Test dependencies."] - True - opts - , field - (buildToolTag opts) - formatDependencyList - tools - ["Extra tools (e.g. alex, hsc2hs, ...) needed to build the source."] - False - opts - ] + ( insertCommonStanzas opts + ++ insertRtsOptionsStanza opts + ++ [ case specHasCommonStanzas $ _optCabalSpec opts of + NoCommonStanzas -> PrettyEmpty + _ -> + field + "import" + (hsep . map text) + ["warnings"] + ["Import common warning flags."] + False + opts + , field + "default-language" + id + lang + ["Base language which the package is written in."] + True + opts + , field + "other-modules" + formatOtherModules + otherMods + ["Modules included in this executable, other than Main."] + True + opts + , field + "other-extensions" + formatOtherExtensions + exts + ["LANGUAGE extensions used by modules in this package."] + True + opts + , field + "type" + text + "exitcode-stdio-1.0" + ["The interface type and version of the test suite."] + True + opts + , field + "hs-source-dirs" + formatHsSourceDirs + (makeSymbolicPath <$> dirs) + ["Directories containing source files."] + True + opts + , field + "main-is" + unsafeFromHs + testMain + ["The entrypoint to the test suite."] + True + opts + , field + "build-depends" + formatDependencyList + deps + ["Test dependencies."] + True + opts + , field + (buildToolTag opts) + formatDependencyList + tools + ["Extra tools (e.g. alex, hsc2hs, ...) needed to build the source."] + False + opts + ] + ) where suiteName = text $ unPackageName (_optPkgName opts) ++ "-test" diff --git a/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-no-comments.golden b/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-no-comments.golden index 1f2910867aa..9be65edb19f 100644 --- a/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-no-comments.golden @@ -18,7 +18,9 @@ common warnings ghc-options: -Wall library - import: warnings + import: extensions + import: ghc-options + import: rts-options exposed-modules: MyLib -- other-modules: -- other-extensions: @@ -27,7 +29,9 @@ library default-language: Haskell98 executable y - import: warnings + import: extensions + import: ghc-options + import: rts-options main-is: Main.hs -- other-modules: -- other-extensions: @@ -39,6 +43,9 @@ executable y default-language: Haskell2010 test-suite y-test + import: extensions + import: ghc-options + import: rts-options import: warnings default-language: Haskell2010 -- other-modules: diff --git a/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-with-comments.golden b/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-with-comments.golden index f2a7f5b946c..104742f299f 100644 --- a/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-with-comments.golden @@ -58,8 +58,14 @@ common warnings ghc-options: -Wall library - -- Import common warning flags. - import: warnings + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options -- Modules exported by the library. exposed-modules: MyLib @@ -80,8 +86,14 @@ library default-language: Haskell98 executable y - -- Import common warning flags. - import: warnings + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options -- .hs or .lhs file containing the Main module. main-is: Main.hs @@ -104,6 +116,15 @@ executable y default-language: Haskell2010 test-suite y-test + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options + -- Import common warning flags. import: warnings diff --git a/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-no-comments.golden b/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-no-comments.golden index d4a9ae182ae..2b12e1d4453 100644 --- a/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-no-comments.golden @@ -18,7 +18,9 @@ common warnings ghc-options: -Wall library - import: warnings + import: extensions + import: ghc-options + import: rts-options exposed-modules: MyLib -- other-modules: -- other-extensions: @@ -27,6 +29,9 @@ library default-language: Haskell98 test-suite y-test + import: extensions + import: ghc-options + import: rts-options import: warnings default-language: Haskell2010 -- other-modules: diff --git a/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-with-comments.golden b/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-with-comments.golden index ca37d882854..0ca18eeb566 100644 --- a/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-with-comments.golden @@ -58,8 +58,14 @@ common warnings ghc-options: -Wall library - -- Import common warning flags. - import: warnings + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options -- Modules exported by the library. exposed-modules: MyLib @@ -80,6 +86,15 @@ library default-language: Haskell98 test-suite y-test + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options + -- Import common warning flags. import: warnings diff --git a/cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-no-comments.golden b/cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-no-comments.golden index ab5329bfab5..c364c8f2024 100644 --- a/cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-no-comments.golden @@ -18,6 +18,9 @@ common warnings ghc-options: -Wall test-suite y-test + import: extensions + import: ghc-options + import: rts-options import: warnings default-language: Haskell2010 -- other-modules: diff --git a/cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-with-comments.golden b/cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-with-comments.golden index 068bf8812c4..0627ee74328 100644 --- a/cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-with-comments.golden @@ -58,6 +58,15 @@ common warnings ghc-options: -Wall test-suite y-test + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options + -- Import common warning flags. import: warnings diff --git a/cabal-install/tests/fixtures/init/golden/exe/exe-build-tools-with-comments.golden b/cabal-install/tests/fixtures/init/golden/exe/exe-build-tools-with-comments.golden index ea22096155a..c40a621a8d7 100644 --- a/cabal-install/tests/fixtures/init/golden/exe/exe-build-tools-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/exe/exe-build-tools-with-comments.golden @@ -1,6 +1,12 @@ executable y - -- Import common warning flags. - import: warnings + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options -- .hs or .lhs file containing the Main module. main-is: Main.hs diff --git a/cabal-install/tests/fixtures/init/golden/exe/exe-minimal-no-comments.golden b/cabal-install/tests/fixtures/init/golden/exe/exe-minimal-no-comments.golden index 4d520a4580c..55b4162506b 100644 --- a/cabal-install/tests/fixtures/init/golden/exe/exe-minimal-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/exe/exe-minimal-no-comments.golden @@ -1,5 +1,7 @@ executable y - import: warnings + import: extensions + import: ghc-options + import: rts-options main-is: Main.hs build-depends: base hs-source-dirs: exe diff --git a/cabal-install/tests/fixtures/init/golden/exe/exe-no-comments.golden b/cabal-install/tests/fixtures/init/golden/exe/exe-no-comments.golden index 3f5464cdaf7..c78885ed46c 100644 --- a/cabal-install/tests/fixtures/init/golden/exe/exe-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/exe/exe-no-comments.golden @@ -1,5 +1,7 @@ executable y - import: warnings + import: extensions + import: ghc-options + import: rts-options main-is: Main.hs -- other-modules: -- other-extensions: diff --git a/cabal-install/tests/fixtures/init/golden/exe/exe-simple-minimal-with-comments.golden b/cabal-install/tests/fixtures/init/golden/exe/exe-simple-minimal-with-comments.golden index 4d520a4580c..55b4162506b 100644 --- a/cabal-install/tests/fixtures/init/golden/exe/exe-simple-minimal-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/exe/exe-simple-minimal-with-comments.golden @@ -1,5 +1,7 @@ executable y - import: warnings + import: extensions + import: ghc-options + import: rts-options main-is: Main.hs build-depends: base hs-source-dirs: exe diff --git a/cabal-install/tests/fixtures/init/golden/exe/exe-with-comments.golden b/cabal-install/tests/fixtures/init/golden/exe/exe-with-comments.golden index 2669151b85d..592ba7ec105 100644 --- a/cabal-install/tests/fixtures/init/golden/exe/exe-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/exe/exe-with-comments.golden @@ -1,6 +1,12 @@ executable y - -- Import common warning flags. - import: warnings + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options -- .hs or .lhs file containing the Main module. main-is: Main.hs diff --git a/cabal-install/tests/fixtures/init/golden/lib/lib-build-tools-with-comments.golden b/cabal-install/tests/fixtures/init/golden/lib/lib-build-tools-with-comments.golden index 609bbe48098..1f2290220f7 100644 --- a/cabal-install/tests/fixtures/init/golden/lib/lib-build-tools-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/lib/lib-build-tools-with-comments.golden @@ -1,6 +1,12 @@ library - -- Import common warning flags. - import: warnings + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options -- Modules exported by the library. exposed-modules: MyLib diff --git a/cabal-install/tests/fixtures/init/golden/lib/lib-minimal-no-comments.golden b/cabal-install/tests/fixtures/init/golden/lib/lib-minimal-no-comments.golden index d1aa9941110..a1d59ab63e4 100644 --- a/cabal-install/tests/fixtures/init/golden/lib/lib-minimal-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/lib/lib-minimal-no-comments.golden @@ -1,5 +1,7 @@ library - import: warnings + import: extensions + import: ghc-options + import: rts-options exposed-modules: MyLib build-depends: base hs-source-dirs: src diff --git a/cabal-install/tests/fixtures/init/golden/lib/lib-no-comments.golden b/cabal-install/tests/fixtures/init/golden/lib/lib-no-comments.golden index 6d596b9a8ed..719138f2ac8 100644 --- a/cabal-install/tests/fixtures/init/golden/lib/lib-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/lib/lib-no-comments.golden @@ -1,5 +1,7 @@ library - import: warnings + import: extensions + import: ghc-options + import: rts-options exposed-modules: MyLib -- other-modules: -- other-extensions: diff --git a/cabal-install/tests/fixtures/init/golden/lib/lib-simple-minimal-with-comments.golden b/cabal-install/tests/fixtures/init/golden/lib/lib-simple-minimal-with-comments.golden index d1aa9941110..a1d59ab63e4 100644 --- a/cabal-install/tests/fixtures/init/golden/lib/lib-simple-minimal-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/lib/lib-simple-minimal-with-comments.golden @@ -1,5 +1,7 @@ library - import: warnings + import: extensions + import: ghc-options + import: rts-options exposed-modules: MyLib build-depends: base hs-source-dirs: src diff --git a/cabal-install/tests/fixtures/init/golden/lib/lib-simple-no-comments.golden b/cabal-install/tests/fixtures/init/golden/lib/lib-simple-no-comments.golden index 6d596b9a8ed..719138f2ac8 100644 --- a/cabal-install/tests/fixtures/init/golden/lib/lib-simple-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/lib/lib-simple-no-comments.golden @@ -1,5 +1,7 @@ library - import: warnings + import: extensions + import: ghc-options + import: rts-options exposed-modules: MyLib -- other-modules: -- other-extensions: diff --git a/cabal-install/tests/fixtures/init/golden/lib/lib-with-comments.golden b/cabal-install/tests/fixtures/init/golden/lib/lib-with-comments.golden index 3df8e499d8d..009a0f02489 100644 --- a/cabal-install/tests/fixtures/init/golden/lib/lib-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/lib/lib-with-comments.golden @@ -1,6 +1,12 @@ library - -- Import common warning flags. - import: warnings + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options -- Modules exported by the library. exposed-modules: MyLib diff --git a/cabal-install/tests/fixtures/init/golden/test/standalone-test-no-comments.golden b/cabal-install/tests/fixtures/init/golden/test/standalone-test-no-comments.golden index b881e0a6a30..b6c007b4b69 100644 --- a/cabal-install/tests/fixtures/init/golden/test/standalone-test-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/test/standalone-test-no-comments.golden @@ -1,4 +1,7 @@ test-suite y-test + import: extensions + import: ghc-options + import: rts-options import: warnings default-language: Haskell2010 -- other-modules: diff --git a/cabal-install/tests/fixtures/init/golden/test/standalone-test-with-comments.golden b/cabal-install/tests/fixtures/init/golden/test/standalone-test-with-comments.golden index 02ed0cfd962..2d2391d3736 100644 --- a/cabal-install/tests/fixtures/init/golden/test/standalone-test-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/test/standalone-test-with-comments.golden @@ -1,4 +1,13 @@ test-suite y-test + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options + -- Import common warning flags. import: warnings diff --git a/cabal-install/tests/fixtures/init/golden/test/test-build-tools-with-comments.golden b/cabal-install/tests/fixtures/init/golden/test/test-build-tools-with-comments.golden index 105afeb3465..e76c8205096 100644 --- a/cabal-install/tests/fixtures/init/golden/test/test-build-tools-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/test/test-build-tools-with-comments.golden @@ -1,4 +1,13 @@ test-suite y-test + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options + -- Import common warning flags. import: warnings diff --git a/cabal-install/tests/fixtures/init/golden/test/test-minimal-no-comments.golden b/cabal-install/tests/fixtures/init/golden/test/test-minimal-no-comments.golden index 2a95da04c2e..364652831c8 100644 --- a/cabal-install/tests/fixtures/init/golden/test/test-minimal-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/test/test-minimal-no-comments.golden @@ -1,4 +1,7 @@ test-suite y-test + import: extensions + import: ghc-options + import: rts-options import: warnings default-language: Haskell2010 type: exitcode-stdio-1.0 diff --git a/cabal-install/tests/fixtures/init/golden/test/test-no-comments.golden b/cabal-install/tests/fixtures/init/golden/test/test-no-comments.golden index b881e0a6a30..b6c007b4b69 100644 --- a/cabal-install/tests/fixtures/init/golden/test/test-no-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/test/test-no-comments.golden @@ -1,4 +1,7 @@ test-suite y-test + import: extensions + import: ghc-options + import: rts-options import: warnings default-language: Haskell2010 -- other-modules: diff --git a/cabal-install/tests/fixtures/init/golden/test/test-simple-minimal-with-comments.golden b/cabal-install/tests/fixtures/init/golden/test/test-simple-minimal-with-comments.golden index 2a95da04c2e..364652831c8 100644 --- a/cabal-install/tests/fixtures/init/golden/test/test-simple-minimal-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/test/test-simple-minimal-with-comments.golden @@ -1,4 +1,7 @@ test-suite y-test + import: extensions + import: ghc-options + import: rts-options import: warnings default-language: Haskell2010 type: exitcode-stdio-1.0 diff --git a/cabal-install/tests/fixtures/init/golden/test/test-with-comments.golden b/cabal-install/tests/fixtures/init/golden/test/test-with-comments.golden index 02ed0cfd962..2d2391d3736 100644 --- a/cabal-install/tests/fixtures/init/golden/test/test-with-comments.golden +++ b/cabal-install/tests/fixtures/init/golden/test/test-with-comments.golden @@ -1,4 +1,13 @@ test-suite y-test + -- Common language extensions + import: extensions + + -- Common compiler warnings and optimisations + import: ghc-options + + -- Common RTS options + import: rts-options + -- Import common warning flags. import: warnings