From 78a7500c6809a7360722bac7fb57ad5548116d1c Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Fri, 30 Oct 2015 20:10:21 +0100 Subject: Fix older Cabal versions --- CabalHelper/Licenses.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'CabalHelper') diff --git a/CabalHelper/Licenses.hs b/CabalHelper/Licenses.hs index d1258c7..eeebae7 100644 --- a/CabalHelper/Licenses.hs +++ b/CabalHelper/Licenses.hs @@ -16,7 +16,6 @@ import System.Exit (exitFailure) import System.FilePath (takeExtension) import System.IO (hPutStrLn, stderr) -import Distribution.InstalledPackageInfo import Distribution.InstalledPackageInfo import Distribution.License import Distribution.Package @@ -37,10 +36,10 @@ type CPackageIndex a = PackageIndex #if CABAL_MAJOR == 1 && CABAL_MINOR > 22 type CInstalledPackageId = ComponentId lookupInstalledPackageId = lookupComponentId +#else +type CInstalledPackageId = InstalledPackageId #endif - - findTransitiveDependencies :: CPackageIndex a -> Set CInstalledPackageId @@ -58,7 +57,7 @@ findTransitiveDependencies pkgIdx set0 = go Set.empty (Set.toList set0) -- We can ignore those. go set queue Just ipi -> - go (Set.insert q set) (depends ipi ++ queue) + go (Set.insert q set) (Distribution.InstalledPackageInfo.depends ipi ++ queue) -------------------------------------------------------------------------------- -- cgit v1.2.3