Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
sheaf
GHC
Commits
f50c19b8
Commit
f50c19b8
authored
May 13, 2020
by
Sylvain Henry
Committed by
Marge Bot
Jun 13, 2020
Browse files
Rename listUnitInfoMap into listUnitInfo
There is no Map involved
parent
d2109b4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/GHC/Unit/State.hs
View file @
f50c19b8
...
...
@@ -16,7 +16,7 @@ module GHC.Unit.State (
readPackageDatabase
,
getPackageConfRefs
,
resolvePackageDatabase
,
listUnitInfo
Map
,
listUnitInfo
,
-- * Querying the package config
lookupUnit
,
...
...
@@ -438,7 +438,7 @@ lookupPackageName pkgstate n = Map.lookup n (packageNameMap pkgstate)
-- | Search for packages with a given package ID (e.g. \"foo-0.1\")
searchPackageId
::
PackageState
->
PackageId
->
[
UnitInfo
]
searchPackageId
pkgstate
pid
=
filter
((
pid
==
)
.
unitPackageId
)
(
listUnitInfo
Map
pkgstate
)
(
listUnitInfo
pkgstate
)
-- | Create a Map UnitId UnitInfo
--
...
...
@@ -464,8 +464,8 @@ mkUnitInfoMap infos
-- this function, although all packages in this map are "visible", this
-- does not imply that the exposed-modules of the package are available
-- (they may have been thinned or renamed).
listUnitInfo
Map
::
PackageState
->
[
UnitInfo
]
listUnitInfo
Map
pkgstate
=
eltsUDFM
pkg_map
listUnitInfo
::
PackageState
->
[
UnitInfo
]
listUnitInfo
pkgstate
=
eltsUDFM
pkg_map
where
UnitInfoMap
pkg_map
_
=
unitInfoMap
pkgstate
...
...
@@ -2089,7 +2089,7 @@ pprPackages = pprPackagesWith pprUnitInfo
pprPackagesWith
::
(
UnitInfo
->
SDoc
)
->
PackageState
->
SDoc
pprPackagesWith
pprIPI
pkgstate
=
vcat
(
intersperse
(
text
"---"
)
(
map
pprIPI
(
listUnitInfo
Map
pkgstate
)))
vcat
(
intersperse
(
text
"---"
)
(
map
pprIPI
(
listUnitInfo
pkgstate
)))
-- | Show simplified package info.
--
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment