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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/57037fd2d0dbdcca7ee625291e688596fccb9d04

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

commit 57037fd2d0dbdcca7ee625291e688596fccb9d04
Author: Andres Loeh <[email protected]>
Date:   Sun Jun 5 11:00:28 2011 +0000

    moving PackagesPreferenceDefault

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

 cabal-install/Distribution/Client/Dependency.hs    |   26 +-------------------
 .../Distribution/Client/Dependency/Types.hs        |   25 +++++++++++++++++++
 2 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/cabal-install/Distribution/Client/Dependency.hs 
b/cabal-install/Distribution/Client/Dependency.hs
index 6946066..772580c 100644
--- a/cabal-install/Distribution/Client/Dependency.hs
+++ b/cabal-install/Distribution/Client/Dependency.hs
@@ -58,6 +58,7 @@ import Distribution.Client.Types
 import Distribution.Client.Dependency.Types
          ( DependencyResolver, PackageConstraint(..)
          , PackagePreferences(..), InstalledPreference(..)
+         , PackagesPreferenceDefault(..)
          , Progress(..), foldProgress )
 import Distribution.Client.Targets
 import Distribution.Package
@@ -98,31 +99,6 @@ data DepResolverParams = DepResolverParams {
      }
 
 
--- | Global policy for all packages to say if we prefer package versions that
--- are already installed locally or if we just prefer the latest available.

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

-data PackagesPreferenceDefault =
-
-     -- | Always prefer the latest version irrespective of any existing
-     -- installed version.
-     --
-     -- * This is the standard policy for upgrade.
-     --
-     PreferAllLatest
-
-     -- | Always prefer the installed versions over ones that would need to be
-     -- installed. Secondarily, prefer latest versions (eg the latest installed
-     -- version or if there are none then the latest source version).
-   | PreferAllInstalled
-
-     -- | Prefer the latest version for packages that are explicitly requested
-     -- but prefers the installed version for any other packages.
-     --
-     -- * This is the standard policy for install.
-     --
-   | PreferLatestForSelected
-
-
 -- | A package selection preference for a particular package.
 --
 -- Preferences are soft constraints that the dependency resolver should try to
diff --git a/cabal-install/Distribution/Client/Dependency/Types.hs 
b/cabal-install/Distribution/Client/Dependency/Types.hs
index 5b245a1..dd31c4d 100644
--- a/cabal-install/Distribution/Client/Dependency/Types.hs
+++ b/cabal-install/Distribution/Client/Dependency/Types.hs
@@ -16,6 +16,7 @@ module Distribution.Client.Dependency.Types (
     PackageConstraint(..),
     PackagePreferences(..),
     InstalledPreference(..),
+    PackagesPreferenceDefault(..),
 
     Progress(..),
     foldProgress,
@@ -81,6 +82,30 @@ data PackageConstraint
 --
 data PackagePreferences = PackagePreferences VersionRange InstalledPreference
 
+-- | Global policy for all packages to say if we prefer package versions that
+-- are already installed locally or if we just prefer the latest available.
+--
+data PackagesPreferenceDefault =
+
+     -- | Always prefer the latest version irrespective of any existing
+     -- installed version.
+     --
+     -- * This is the standard policy for upgrade.
+     --
+     PreferAllLatest
+
+     -- | Always prefer the installed versions over ones that would need to be
+     -- installed. Secondarily, prefer latest versions (eg the latest installed
+     -- version or if there are none then the latest source version).
+   | PreferAllInstalled
+
+     -- | Prefer the latest version for packages that are explicitly requested
+     -- but prefers the installed version for any other packages.
+     --
+     -- * This is the standard policy for install.
+     --
+   | PreferLatestForSelected
+
 -- | Wether we prefer an installed version of a package or simply the latest
 -- version.
 --



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

Reply via email to