Commit a1f7a6d3 authored by bardur.arantsson's avatar bardur.arantsson

Move LabeledPackageConstraint to Distribution.Solver.* namespace

parent baef5a5b
......@@ -19,8 +19,6 @@ module Distribution.Client.Configure (
) where
import Distribution.Client.Dependency
import Distribution.Client.Dependency.Types
( LabeledPackageConstraint(..) )
import qualified Distribution.Client.InstallPlan as InstallPlan
import Distribution.Client.InstallPlan (SolverInstallPlan)
import Distribution.Client.IndexUtils as IndexUtils
......@@ -38,6 +36,7 @@ import Distribution.Client.JobControl (Lock)
import qualified Distribution.Solver.Types.ComponentDeps as CD
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import Distribution.Solver.Types.PackageIndex
( PackageIndex, elemByPackageName )
......
......@@ -75,7 +75,6 @@ import Distribution.Client.Types
, enableStanzas )
import Distribution.Client.Dependency.Types
( PreSolver(..), Solver(..), DependencyResolver
, LabeledPackageConstraint(..), unlabelPackageConstraint
, PackagePreferences(..), InstalledPreference(..)
, PackagesPreferenceDefault(..) )
import Distribution.Client.Sandbox.Types
......@@ -115,6 +114,7 @@ import Distribution.Verbosity
import Distribution.Solver.Types.ComponentDeps (ComponentDeps)
import qualified Distribution.Solver.Types.ComponentDeps as CD
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import Distribution.Solver.Types.PackageConstraint
import qualified Distribution.Solver.Types.PackageIndex as PackageIndex
......
......@@ -24,7 +24,6 @@ import Distribution.Client.Types
, UnresolvedSourcePackage, enableStanzas )
import Distribution.Client.Dependency.Types
( DependencyResolver
, unlabelPackageConstraint
, PackagePreferences(..), InstalledPreference(..) )
......@@ -56,6 +55,7 @@ import Distribution.Text
import Distribution.Solver.Types.ComponentDeps (ComponentDeps)
import qualified Distribution.Solver.Types.ComponentDeps as CD
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.PackageConstraint
import qualified Distribution.Solver.Types.PackageIndex as PackageIndex
import Distribution.Solver.Types.PackageIndex (PackageIndex)
......
......@@ -21,18 +21,14 @@ module Distribution.Client.Dependency.Types (
InstalledPreference(..),
PackagesPreferenceDefault(..),
LabeledPackageConstraint(..),
unlabelPackageConstraint
) where
import Data.Char
( isAlpha, toLower )
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import Distribution.Solver.Types.PkgConfigDb ( PkgConfigDb )
import Distribution.Solver.Types.PackageConstraint ( PackageConstraint )
import Distribution.Solver.Types.PackageIndex ( PackageIndex )
import Distribution.Solver.Types.Progress
import Distribution.Solver.Types.ResolverPackage
......@@ -146,10 +142,3 @@ data PackagesPreferenceDefault =
--
| PreferLatestForSelected
deriving Show
-- | 'PackageConstraint' labeled with its source.
data LabeledPackageConstraint
= LabeledPackageConstraint PackageConstraint ConstraintSource
unlabelPackageConstraint :: LabeledPackageConstraint -> PackageConstraint
unlabelPackageConstraint (LabeledPackageConstraint pc _) = pc
......@@ -20,8 +20,6 @@ import Distribution.Client.Config ( SavedConfig(..) )
import Distribution.Client.Types
import Distribution.Client.Targets
import Distribution.Client.Dependency
import Distribution.Client.Dependency.Types
( LabeledPackageConstraint(..) )
import Distribution.Client.IndexUtils as IndexUtils
( getSourcePackages, getInstalledPackages )
import Distribution.Client.InstallPlan
......@@ -37,9 +35,9 @@ import Distribution.Client.Sandbox.Types
( SandboxPackageInfo(..) )
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import Distribution.Solver.Types.PkgConfigDb
( PkgConfigDb, readPkgConfigDb )
import Distribution.Solver.Types.SolverId
import Distribution.Package
......
......@@ -72,7 +72,7 @@ import Distribution.Client.Configure
( chooseCabalVersion, configureSetupScript, checkConfigExFlags )
import Distribution.Client.Dependency
import Distribution.Client.Dependency.Types
( Solver(..), LabeledPackageConstraint(..) )
( Solver(..) )
import Distribution.Client.FetchUtils
import Distribution.Client.HttpUtils
( HttpTransport (..) )
......@@ -111,6 +111,7 @@ import Distribution.Client.JobControl
import qualified Distribution.Solver.Types.ComponentDeps as CD
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import qualified Distribution.Solver.Types.PackageIndex as SourcePackageIndex
import Distribution.Solver.Types.PackageFixedDeps
......
......@@ -79,6 +79,7 @@ import Distribution.Utils.NubList
import qualified Distribution.Solver.Types.ComponentDeps as CD
import Distribution.Solver.Types.ComponentDeps (ComponentDeps)
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import Distribution.Solver.Types.PackageFixedDeps
import qualified Distribution.Solver.Types.PackageIndex as SourcePackageIndex
......
......@@ -57,10 +57,9 @@ import Distribution.Package
import Distribution.Client.Types
( PackageLocation(..)
, ResolvedPkgLoc, UnresolvedSourcePackage )
import Distribution.Client.Dependency.Types
( LabeledPackageConstraint(..) )
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import Distribution.Solver.Types.PackageConstraint
import Distribution.Solver.Types.PackageIndex (PackageIndex)
......
......@@ -23,10 +23,10 @@ import Distribution.Solver.Modular.Package
( PN )
import Distribution.Solver.Modular.Solver
( SolverConfig(..), solve )
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.PackageConstraint
import Distribution.Client.Dependency.Types
( DependencyResolver
, unlabelPackageConstraint )
( DependencyResolver )
import Distribution.System
( Platform(..) )
......
......@@ -29,9 +29,9 @@ import Data.Map (Map)
import Data.Traversable (sequence)
import Distribution.Client.Dependency.Types
( LabeledPackageConstraint(..)
, PackagePreferences(..), InstalledPreference(..) )
( PackagePreferences(..), InstalledPreference(..) )
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import Distribution.Solver.Types.PackageConstraint
......
......@@ -8,10 +8,11 @@ import Data.Map as M
import Distribution.Compiler (CompilerInfo)
import Distribution.Solver.Types.PkgConfigDb (PkgConfigDb)
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.Settings
import Distribution.Client.Dependency.Types
( PackagePreferences, LabeledPackageConstraint )
( PackagePreferences )
import Distribution.Solver.Modular.Assignment
import Distribution.Solver.Modular.Builder
......
module Distribution.Solver.Types.LabeledPackageConstraint
( LabeledPackageConstraint(..)
, unlabelPackageConstraint
) where
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.PackageConstraint
-- | 'PackageConstraint' labeled with its source.
data LabeledPackageConstraint
= LabeledPackageConstraint PackageConstraint ConstraintSource
unlabelPackageConstraint :: LabeledPackageConstraint -> PackageConstraint
unlabelPackageConstraint (LabeledPackageConstraint pc _) = pc
......@@ -223,6 +223,7 @@ executable cabal
Distribution.Solver.Types.ComponentDeps
Distribution.Solver.Types.ConstraintSource
Distribution.Solver.Types.Internal.Utils
Distribution.Solver.Types.LabeledPackageConstraint
Distribution.Solver.Types.OptionalStanza
Distribution.Solver.Types.PackageConstraint
Distribution.Solver.Types.PackageFixedDeps
......
......@@ -49,6 +49,7 @@ import qualified Distribution.Client.InstallPlan as CI.InstallPlan
import Distribution.Solver.Types.ComponentDeps (ComponentDeps)
import qualified Distribution.Solver.Types.ComponentDeps as CD
import Distribution.Solver.Types.ConstraintSource
import Distribution.Solver.Types.LabeledPackageConstraint
import Distribution.Solver.Types.OptionalStanza
import qualified Distribution.Solver.Types.PackageIndex as CI.PackageIndex
import qualified Distribution.Solver.Types.PkgConfigDb as PC
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment