Skip to content
Snippets Groups Projects
Commit c3236706 authored by Edward Z. Yang's avatar Edward Z. Yang Committed by GitHub
Browse files

Merge pull request #4004 from dcoutts/master

Avoid generating redundant constraints in new-freeze
parents 9f527bce e2c6cd31
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,8 @@ import qualified Distribution.Client.InstallPlan as InstallPlan
import Distribution.Package
( PackageName, packageName, packageVersion )
import Distribution.Version
( VersionRange, thisVersion, unionVersionRanges )
( VersionRange, thisVersion
, unionVersionRanges, simplifyVersionRange )
import Distribution.PackageDescription
( FlagAssignment )
import Distribution.Client.Setup
......@@ -151,6 +152,7 @@ projectFreezeConstraints plan =
versionRanges :: Map PackageName VersionRange
versionRanges =
Map.map simplifyVersionRange $
Map.fromListWith unionVersionRanges $
[ (packageName pkg, thisVersion (packageVersion pkg))
| InstallPlan.PreExisting pkg <- InstallPlan.toList plan
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment