Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the latest cabal spec in the interactive package init #8978

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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' \
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/Init/Defaults.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ defaultTestDir :: String
defaultTestDir = "test"

defaultCabalVersion :: CabalSpecVersion
defaultCabalVersion = CabalSpecV3_0
defaultCabalVersion = CabalSpecV3_4

defaultPackageType :: PackageType
defaultPackageType = Executable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment looks like it's doomed to fall behind. Why don't we kill it, and anyone should be able to look up the definition of defautCabalVersion themselves?

displayCabalVersion :: CabalSpecVersion -> String
displayCabalVersion v = case v of
CabalSpecV2_0 -> "2.0 (support for Backpack, internal sub-libs, '^>=' operator)"
Expand Down
9 changes: 9 additions & 0 deletions changelog.d/pr-8978
Original file line number Diff line number Diff line change
@@ -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

}
Loading