@@ -79,6 +79,7 @@ import Distribution.Simple.BuildTarget
79
79
import Distribution.Simple.LocalBuildInfo
80
80
import Distribution.Types.ExeDependency
81
81
import Distribution.Types.LegacyExeDependency
82
+ import Distribution.Types.PackageVersionConstraint
82
83
import Distribution.Types.PkgconfigVersion
83
84
import Distribution.Types.PkgconfigDependency
84
85
import Distribution.Types.PkgconfigVersionRange
@@ -450,7 +451,7 @@ configure (pkg_descr0, pbi) cfg = do
450
451
-- NB: The fact that we bundle all the constraints together means
451
452
-- that is not possible to configure a test-suite to use one
452
453
-- version of a dependency, and the executable to use another.
453
- (allConstraints :: [Dependency ],
454
+ (allConstraints :: [PackageVersionConstraint ],
454
455
requiredDepsMap :: Map (PackageName , ComponentName ) InstalledPackageInfo )
455
456
<- either (die' verbosity) return $
456
457
combinedConstraints (configConstraints cfg)
@@ -1000,7 +1001,7 @@ configureFinalizedPackage
1000
1001
:: Verbosity
1001
1002
-> ConfigFlags
1002
1003
-> ComponentRequestedSpec
1003
- -> [Dependency ]
1004
+ -> [PackageVersionConstraint ]
1004
1005
-> (Dependency -> Bool ) -- ^ tests if a dependency is satisfiable.
1005
1006
-- Might say it's satisfiable even when not.
1006
1007
-> Compiler
@@ -1459,10 +1460,10 @@ interpretPackageDbFlags userInstall specificDBs =
1459
1460
-- deps in the end. So we still need to remember which installed packages to
1460
1461
-- pick.
1461
1462
combinedConstraints
1462
- :: [Dependency ]
1463
+ :: [PackageVersionConstraint ]
1463
1464
-> [GivenComponent ]
1464
1465
-> InstalledPackageIndex
1465
- -> Either String ([Dependency ],
1466
+ -> Either String ([PackageVersionConstraint ],
1466
1467
Map (PackageName , ComponentName ) InstalledPackageInfo )
1467
1468
combinedConstraints constraints dependencies installedPackages = do
1468
1469
@@ -1476,9 +1477,9 @@ combinedConstraints constraints dependencies installedPackages = do
1476
1477
return (allConstraints, idConstraintMap)
1477
1478
1478
1479
where
1479
- allConstraints :: [Dependency ]
1480
+ allConstraints :: [PackageVersionConstraint ]
1480
1481
allConstraints = constraints
1481
- ++ [ thisPackageVersion (packageId pkg)
1482
+ ++ [ thisPackageVersionConstraint (packageId pkg)
1482
1483
| (_, _, _, Just pkg) <- dependenciesPkgInfo ]
1483
1484
1484
1485
idConstraintMap :: Map (PackageName , ComponentName ) InstalledPackageInfo
0 commit comments