Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/163267f50f2b075702977c85050069d5b1f4512f

>---------------------------------------------------------------

commit 163267f50f2b075702977c85050069d5b1f4512f
Author: bjorn <[email protected]>
Date:   Sun Oct 7 10:12:49 2007 +0000

    Some minor refactoring.n

>---------------------------------------------------------------

 .../src/Network/Hackage/CabalInstall/Config.hs     |    6 +-----
 .../src/Network/Hackage/CabalInstall/Dependency.hs |    6 ++----
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/cabal-install/src/Network/Hackage/CabalInstall/Config.hs 
b/cabal-install/src/Network/Hackage/CabalInstall/Config.hs
index 8ab871f..c4c6851 100644
--- a/cabal-install/src/Network/Hackage/CabalInstall/Config.hs
+++ b/cabal-install/src/Network/Hackage/CabalInstall/Config.hs
@@ -62,13 +62,9 @@ import Network.Hackage.CabalInstall.Types (ConfigFlags (..), 
PkgInfo (..), Repo(
 import Network.Hackage.CabalInstall.Utils
 
 
--- |Name of the packages directory.
-packagesDirectoryName :: FilePath
-packagesDirectoryName = "packages"
-
 -- | Full path to the packages directory.
 packagesDirectory :: ConfigFlags -> FilePath
-packagesDirectory cfg = configCacheDir cfg </> packagesDirectoryName
+packagesDirectory cfg = configCacheDir cfg </> "packages"
 
 -- | Full path to the local cache directory for a repository.
 repoCacheDir :: ConfigFlags -> Repo -> FilePath
diff --git a/cabal-install/src/Network/Hackage/CabalInstall/Dependency.hs 
b/cabal-install/src/Network/Hackage/CabalInstall/Dependency.hs
index c87ab29..bf6d5a4 100644
--- a/cabal-install/src/Network/Hackage/CabalInstall/Dependency.hs
+++ b/cabal-install/src/Network/Hackage/CabalInstall/Dependency.hs
@@ -149,9 +149,7 @@ getPackages = map worker
 
 -- |List all packages which can be fetched.
 filterFetchables :: [ResolvedPackage] -> [(PackageIdentifier,Repo)]
-filterFetchables = mapMaybe worker
-    where worker dep = do (pkg,repo,_) <- resolvedData dep
-                          return (pkg,repo)
+filterFetchables pkgs = [(pkg,repo) | Just (pkg,repo,_) <- map resolvedData 
pkgs]
 
 finalizePackage :: Compiler 
                 -> [PackageIdentifier] -- ^ All installed packages
@@ -188,7 +186,7 @@ resolveDependenciesAux cfg ps deps
                     Nothing -> resolvedDepToResolvedPkg (dependency 
dep,Nothing)
                     _ -> rDep
          return $ map resolve (filter (not . isInstalled ps . dependency) deps)
-    where 
+
 -- |Resolve some dependencies from the known packages while filtering out 
installed packages.
 --  The result has been modified to put the dependencies in front of the 
packages.
 resolveDependencies :: ConfigFlags



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to