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 Paths_cabal_install for cabal-install version number #9421

Merged
Merged
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
2 changes: 2 additions & 0 deletions cabal-install/cabal-install.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ library
default-extensions: TypeOperators

hs-source-dirs: src
other-modules:
Paths_cabal_install
exposed-modules:
-- this modules are moved from Cabal
-- they are needed for as long until cabal-install moves to parsec parser
Expand Down
12 changes: 5 additions & 7 deletions cabal-install/src/Distribution/Client/Version.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ module Distribution.Client.Version

import Distribution.Version

-- This value determines the `cabal-install --version` output.
--
-- It is used in several places throughout the project, including anonymous build reports, client configuration,
-- and project planning output. Historically, this was a @Paths_*@ module, however, this conflicted with
-- program coverage information generated by HPC, and hence was moved to be a standalone value.
--
import qualified Paths_cabal_install as PackageInfo

-- |
-- This value determines the output of `cabal-install --version`.
cabalInstallVersion :: Version
cabalInstallVersion = mkVersion [3, 11]
cabalInstallVersion = mkVersion' PackageInfo.version
Loading