From 504814b44930efd5c5e0b033e47740f6d7bd241e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= Date: Tue, 7 Nov 2023 23:36:18 +0100 Subject: [PATCH] Use PackageInfo for cabal-install version number --- cabal-install/cabal-install.cabal | 2 ++ cabal-install/src/Distribution/Client/Version.hs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal index e45dc58a408..df3e78e02f7 100644 --- a/cabal-install/cabal-install.cabal +++ b/cabal-install/cabal-install.cabal @@ -63,6 +63,8 @@ library default-extensions: TypeOperators hs-source-dirs: src + other-modules: + PackageInfo_cabal_install exposed-modules: -- this modules are moved from Cabal -- they are needed for as long until cabal-install moves to parsec parser diff --git a/cabal-install/src/Distribution/Client/Version.hs b/cabal-install/src/Distribution/Client/Version.hs index dc06552350f..a69dfb5994e 100644 --- a/cabal-install/src/Distribution/Client/Version.hs +++ b/cabal-install/src/Distribution/Client/Version.hs @@ -5,6 +5,8 @@ module Distribution.Client.Version import Distribution.Version +import qualified PackageInfo_cabal_install as PackageInfo + -- This value determines the `cabal-install --version` output. -- -- It is used in several places throughout the project, including anonymous build reports, client configuration, @@ -12,4 +14,4 @@ import Distribution.Version -- program coverage information generated by HPC, and hence was moved to be a standalone value. -- cabalInstallVersion :: Version -cabalInstallVersion = mkVersion [3, 11] +cabalInstallVersion = mkVersion' PackageInfo.version