diff options
| author | Daniel Gröber <dxld@darkboxed.org> | 2015-10-30 20:10:21 +0100 | 
|---|---|---|
| committer | Daniel Gröber <dxld@darkboxed.org> | 2015-10-30 20:10:21 +0100 | 
| commit | 78a7500c6809a7360722bac7fb57ad5548116d1c (patch) | |
| tree | 43d3dde106c75010d06094730f1725a548f1856c | |
| parent | 103d5e6dabf8975c3903f62afd0418801778cd71 (diff) | |
Fix older Cabal versions
| -rw-r--r-- | CabalHelper/Licenses.hs | 7 | ||||
| -rw-r--r-- | tests/Spec.hs | 4 | 
2 files changed, 5 insertions, 6 deletions
diff --git a/CabalHelper/Licenses.hs b/CabalHelper/Licenses.hs index d1258c7..eeebae7 100644 --- a/CabalHelper/Licenses.hs +++ b/CabalHelper/Licenses.hs @@ -17,7 +17,6 @@ import System.FilePath (takeExtension)  import System.IO (hPutStrLn, stderr)  import Distribution.InstalledPackageInfo -import Distribution.InstalledPackageInfo  import Distribution.License  import Distribution.Package  import Distribution.Simple.Configure @@ -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)  -------------------------------------------------------------------------------- diff --git a/tests/Spec.hs b/tests/Spec.hs index 54d88df..6ac5d9c 100644 --- a/tests/Spec.hs +++ b/tests/Spec.hs @@ -16,9 +16,9 @@ import CabalHelper.Types  main :: IO ()  main = do    flip (setEnv "HOME") True =<< fromMaybe "/tmp" <$> lookupEnv "TMPDIR" -  writeAutogenFiles readProcess "." "./dist" +  rawSystem "cabal" ["update"] -  _ <- system "cabal update" +  writeAutogenFiles readProcess "." "./dist"    let vers :: [(Version, [Version])]        vers = map (parseVer *** map parseVer) [  | 
