[commit: Cabal] master: Update for flipped order of args for PackageIndex.insert (b57680d)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:53:01 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b57680d67d87debc55b0570e18b9d789c29e075e
>---------------------------------------------------------------
commit b57680d67d87debc55b0570e18b9d789c29e075e
Author: Duncan Coutts <duncan at haskell.org>
Date: Sun May 4 19:37:22 2008 +0000
Update for flipped order of args for PackageIndex.insert
>---------------------------------------------------------------
cabal-install/Hackage/Install.hs | 2 +-
cabal-install/Hackage/InstallPlan.hs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cabal-install/Hackage/Install.hs b/cabal-install/Hackage/Install.hs
index d1438e5..bb42bd1 100644
--- a/cabal-install/Hackage/Install.hs
+++ b/cabal-install/Hackage/Install.hs
@@ -139,7 +139,7 @@ installLocalPackage verbosity packageDB repos comp conf miscOptions configFlags
let -- The trick is, we add the local package to the available index and
-- then ask to resolve a dependency on exactly that package. So the
-- resolver ends up having to pick the local package.
- available' = PackageIndex.insert available localPackage
+ available' = PackageIndex.insert localPackage available
localPackage = AvailablePackage {
packageInfoId = packageId desc,
Available.packageDescription = desc,
diff --git a/cabal-install/Hackage/InstallPlan.hs b/cabal-install/Hackage/InstallPlan.hs
index d87cc3f..f216900 100644
--- a/cabal-install/Hackage/InstallPlan.hs
+++ b/cabal-install/Hackage/InstallPlan.hs
@@ -261,7 +261,7 @@ completed :: PackageIdentifier
-> InstallPlan buildResult -> InstallPlan buildResult
completed pkgid plan =
case PackageIndex.lookupPackageId index pkgid of
- Just (Configured cp) -> plan { planIndex = PackageIndex.insert index (Installed cp) }
+ Just (Configured cp) -> plan { planIndex = PackageIndex.insert (Installed cp) index }
_ -> error "InstallPlan.completed: internal error; cannot mark package as completed"
where index = planIndex plan
More information about the Cvs-libraries
mailing list