[commit: Cabal] master: Put the check back in for hideBrokenPackages (b34005e)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:53:53 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b34005e9c9fdc230fccf07823e5a25b7ce13f81c
>---------------------------------------------------------------
commit b34005e9c9fdc230fccf07823e5a25b7ce13f81c
Author: Duncan Coutts <duncan at haskell.org>
Date: Fri May 9 16:58:00 2008 +0000
Put the check back in for hideBrokenPackages
>---------------------------------------------------------------
cabal-install/Hackage/Dependency.hs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cabal-install/Hackage/Dependency.hs b/cabal-install/Hackage/Dependency.hs
index 8018ee9..b2c16ee 100644
--- a/cabal-install/Hackage/Dependency.hs
+++ b/cabal-install/Hackage/Dependency.hs
@@ -57,10 +57,13 @@ resolveDependencies os arch comp Nothing available deps =
hideBrokenPackages :: PackageFixedDeps p => PackageIndex p -> PackageIndex p
hideBrokenPackages index =
- foldr (PackageIndex.delete . packageId) index
+ check (null . PackageIndex.brokenPackages)
+ . foldr (PackageIndex.delete . packageId) index
. PackageIndex.reverseDependencyClosure index
. map (packageId . fst)
$ PackageIndex.brokenPackages index
+ where
+ check p x = assert (p x) x
type DependencyResolver a = OS
-> Arch
More information about the Cvs-libraries
mailing list