diff --git a/Makefile b/Makefile index 19e9a4ac63b..40552ef8d6b 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ exe : $(LEXER_HS) init: ## Set up git hooks and ignored revisions @git config core.hooksPath .githooks - ## TODO style: ## Run the code styler @find Cabal Cabal-syntax cabal-install -name '*.hs' \ diff --git a/cabal-install/src/Distribution/Client/Init/Defaults.hs b/cabal-install/src/Distribution/Client/Init/Defaults.hs index 9be998feda7..e0e39622198 100644 --- a/cabal-install/src/Distribution/Client/Init/Defaults.hs +++ b/cabal-install/src/Distribution/Client/Init/Defaults.hs @@ -67,7 +67,7 @@ defaultTestDir :: String defaultTestDir = "test" defaultCabalVersion :: CabalSpecVersion -defaultCabalVersion = CabalSpecV3_0 +defaultCabalVersion = CabalSpecV3_4 defaultPackageType :: PackageType defaultPackageType = Executable diff --git a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs index 2fab0db25cc..b358c38a9bb 100644 --- a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs +++ b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs @@ -306,7 +306,7 @@ cabalVersionPrompt flags = getCabalVersion flags $ do parseCabalVersion "2.4" = CabalSpecV2_4 parseCabalVersion "3.0" = CabalSpecV3_0 parseCabalVersion "3.4" = CabalSpecV3_4 - parseCabalVersion _ = defaultCabalVersion -- 2.4 + parseCabalVersion _ = defaultCabalVersion -- 3.4 displayCabalVersion :: CabalSpecVersion -> String displayCabalVersion v = case v of CabalSpecV2_0 -> "2.0 (support for Backpack, internal sub-libs, '^>=' operator)" diff --git a/changelog.d/pr-8978 b/changelog.d/pr-8978 new file mode 100644 index 00000000000..fa6b04fa676 --- /dev/null +++ b/changelog.d/pr-8978 @@ -0,0 +1,9 @@ +synopsis: Use the latest cabal spec in the interactive package init +packages: cabal-install +prs: #8978 + +description: { + +`cabal init` will now suggest version spec 3.4 when initialising new packages + +}