From ff39baac5b6572916d68d2979079da588a257f52 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sun, 29 Sep 2019 02:08:03 +0200 Subject: Remove Compat.ProgramDb module --- cabal-helper.cabal | 1 - lib/Distribution/Helper.hs | 9 +++++-- src/CabalHelper/Compiletime/Compat/ProgramDb.hs | 31 ------------------------- 3 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 src/CabalHelper/Compiletime/Compat/ProgramDb.hs diff --git a/cabal-helper.cabal b/cabal-helper.cabal index ede2124..384a849 100644 --- a/cabal-helper.cabal +++ b/cabal-helper.cabal @@ -133,7 +133,6 @@ library c-h-internal exposed-modules: CabalHelper.Compiletime.Cabal CabalHelper.Compiletime.Compat.Environment - CabalHelper.Compiletime.Compat.ProgramDb CabalHelper.Compiletime.Compat.Version CabalHelper.Compiletime.Compat.Parsec CabalHelper.Compiletime.Compile diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index 3d7074e..8a3781c 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -157,13 +157,18 @@ import CabalHelper.Shared.Common import CabalHelper.Runtime.HelperMain (helper_main) import CabalHelper.Compiletime.Compat.Version -import qualified CabalHelper.Compiletime.Compat.ProgramDb as ProgDb - ( defaultProgramDb, programPath, lookupProgram, ghcProgram, ghcPkgProgram ) + import Distribution.System (buildPlatform) import Distribution.Text (display) import Distribution.Verbosity (Verbosity, silent, normal, verbose, deafening) import Distribution.Simple.GHC as GHC (configure) +import qualified Distribution.Simple.Program as ProgDb + ( lookupProgram, lookupKnownProgram, programPath + , configureProgram, userMaybeSpecifyPath + , ghcProgram, ghcPkgProgram, haddockProgram ) +import qualified Distribution.Simple.Program.Db as ProgDb + -- $type-conventions -- Throughout the API we use the following conventions for type variables: -- diff --git a/src/CabalHelper/Compiletime/Compat/ProgramDb.hs b/src/CabalHelper/Compiletime/Compat/ProgramDb.hs deleted file mode 100644 index eb0f26d..0000000 --- a/src/CabalHelper/Compiletime/Compat/ProgramDb.hs +++ /dev/null @@ -1,31 +0,0 @@ --- cabal-helper: Simple interface to Cabal's configuration state --- Copyright (C) 2018 Daniel Gröber --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . - -{-# LANGUAGE CPP #-} -module CabalHelper.Compiletime.Compat.ProgramDb - ( defaultProgramDb - , programPath - , lookupProgram - , ghcProgram - , ghcPkgProgram - ) where - -import Distribution.Simple.Program - -#if !MIN_VERSION_Cabal(2,0,0) -defaultProgramDb :: ProgramConfiguration -defaultProgramDb = defaultProgramConfiguration -#endif -- cgit v1.2.3