aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2018-10-11 22:45:18 +0200
committerDaniel Gröber <dxld@darkboxed.org>2018-10-26 04:33:07 +0200
commit2799cc04b621194af91cc0d3239467ab92867560 (patch)
tree5f0f5362c53840a394eb1b01dda5950b176a3aac /src
parentddcbebfa398ce90e561489841e99a5c7732d202f (diff)
Fix a couple of warnings
Diffstat (limited to 'src')
-rw-r--r--src/CabalHelper/Compiletime/Compat/ProgramDb.hs1
-rw-r--r--src/CabalHelper/Shared/Common.hs24
2 files changed, 19 insertions, 6 deletions
diff --git a/src/CabalHelper/Compiletime/Compat/ProgramDb.hs b/src/CabalHelper/Compiletime/Compat/ProgramDb.hs
index 56b033c..eb0f26d 100644
--- a/src/CabalHelper/Compiletime/Compat/ProgramDb.hs
+++ b/src/CabalHelper/Compiletime/Compat/ProgramDb.hs
@@ -26,5 +26,6 @@ module CabalHelper.Compiletime.Compat.ProgramDb
import Distribution.Simple.Program
#if !MIN_VERSION_Cabal(2,0,0)
+defaultProgramDb :: ProgramConfiguration
defaultProgramDb = defaultProgramConfiguration
#endif
diff --git a/src/CabalHelper/Shared/Common.hs b/src/CabalHelper/Shared/Common.hs
index a7e7377..1f0c49e 100644
--- a/src/CabalHelper/Shared/Common.hs
+++ b/src/CabalHelper/Shared/Common.hs
@@ -28,6 +28,19 @@ module CabalHelper.Shared.Common where
#define CH_MIN_VERSION_Cabal MIN_VERSION_Cabal
#endif
+import Distribution.PackageDescription
+ ( GenericPackageDescription
+ )
+import Distribution.Verbosity
+ ( Verbosity
+ )
+
+#if CH_MIN_VERSION_Cabal(2,2,0)
+import qualified Distribution.PackageDescription.Parsec as P
+#else
+import qualified Distribution.PackageDescription.Parse as P
+#endif
+
import Control.Applicative
import Control.Exception as E
import Control.Monad
@@ -39,11 +52,6 @@ import Data.Typeable
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BS8
-#if CH_MIN_VERSION_Cabal(2,2,0)
-import qualified Distribution.PackageDescription.Parsec as P
-#else
-import qualified Distribution.PackageDescription.Parse as P
-#endif
import System.Environment
import System.IO
import qualified System.Info
@@ -143,7 +151,11 @@ replace n r hs' = go "" hs'
go acc [] = reverse acc
-#if CH_MIN_VERSION_Cabal(2,2,0)
+readPackageDescription
+ :: Verbosity
+ -> FilePath
+ -> IO GenericPackageDescription
+#if CH_MIN_VERSION_Cabal(2,0,0)
readPackageDescription = P.readGenericPackageDescription
#else
readPackageDescription = P.readPackageDescription