aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Shared
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/CabalHelper/Shared
parentddcbebfa398ce90e561489841e99a5c7732d202f (diff)
Fix a couple of warnings
Diffstat (limited to 'src/CabalHelper/Shared')
-rw-r--r--src/CabalHelper/Shared/Common.hs24
1 files changed, 18 insertions, 6 deletions
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