Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
f88c9b68
Commit
f88c9b68
authored
9 years ago
by
Edsko de Vries
Browse files
Options
Downloads
Patches
Plain Diff
Allow for dups in configuredPackageProblems
parent
87a79be9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cabal-install/Distribution/Client/InstallPlan.hs
+9
-4
9 additions, 4 deletions
cabal-install/Distribution/Client/InstallPlan.hs
with
9 additions
and
4 deletions
cabal-install/Distribution/Client/InstallPlan.hs
+
9
−
4
View file @
f88c9b68
...
...
@@ -93,10 +93,11 @@ import Distribution.Simple.Utils
import
qualified
Distribution.InstalledPackageInfo
as
Installed
import
Data.List
(
sort
,
sortBy
)
(
sort
,
sortBy
,
nubBy
)
import
Data.Maybe
(
fromMaybe
,
maybeToList
)
import
qualified
Data.Graph
as
Graph
import
Data.Function
(
on
)
import
Data.Graph
(
Graph
)
import
Control.Exception
(
assert
)
...
...
@@ -640,15 +641,19 @@ configuredPackageProblems platform cinfo
mergeDeps
::
[
Dependency
]
->
[
PackageId
]
->
[
MergeResult
Dependency
PackageId
]
mergeDeps
required
specified
=
let
sortNubOn
f
=
nubBy
((
==
)
`
on
`
f
)
.
sortBy
(
compare
`
on
`
f
)
in
mergeBy
(
\
dep
pkgid
->
dependencyName
dep
`
compare
`
packageName
pkgid
)
(
sort
By
(
comparing
dependencyName
)
required
)
(
sort
By
(
comparing
packageName
)
specified
)
(
sort
NubOn
dependencyName
required
)
(
sort
NubOn
packageName
specified
)
-- TODO: It would be nicer to use
Package
Deps here so we can be more precise
-- TODO: It would be nicer to use
Component
Deps here so we can be more precise
-- in our checks. That's a bit tricky though, as this currently relies on
-- the 'buildDepends' field of 'PackageDescription'. (OTOH, that field is
-- deprecated and should be removed anyway.)
-- As long as we _do_ use a flat list here, we have to allow for duplicates
-- when we fold specifiedDeps; once we have proper ComponentDeps here we
-- should get rid of the `nubOn` in `mergeDeps`.
requiredDeps
::
[
Dependency
]
requiredDeps
=
--TODO: use something lower level than finalizePackageDescription
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment