summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Packages.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Packages.hs')
-rw-r--r--compiler/GHC/Driver/Packages.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/GHC/Driver/Packages.hs b/compiler/GHC/Driver/Packages.hs
index 09eac60308..079bf6379f 100644
--- a/compiler/GHC/Driver/Packages.hs
+++ b/compiler/GHC/Driver/Packages.hs
@@ -71,6 +71,7 @@ import GhcPrelude
import GHC.PackageDb
import UnitInfo
import GHC.Driver.Session
+import GHC.Driver.Ways
import Name ( Name, nameModule_maybe )
import UniqFM
import UniqDFM
@@ -1839,22 +1840,22 @@ packageHsLibs dflags p = map (mkDynName . addSuffix) (hsLibraries p)
where
ways0 = ways dflags
- ways1 = filter (/= WayDyn) ways0
+ ways1 = Set.filter (/= WayDyn) ways0
-- the name of a shared library is libHSfoo-ghc<version>.so
-- we leave out the _dyn, because it is superfluous
-- debug and profiled RTSs include support for -eventlog
- ways2 | WayDebug `elem` ways1 || WayProf `elem` ways1
- = filter (/= WayEventLog) ways1
+ ways2 | WayDebug `Set.member` ways1 || WayProf `Set.member` ways1
+ = Set.filter (/= WayEventLog) ways1
| otherwise
= ways1
- tag = waysTag (filter (not . wayRTSOnly) ways2)
+ tag = waysTag (Set.filter (not . wayRTSOnly) ways2)
rts_tag = waysTag ways2
mkDynName x
- | WayDyn `notElem` ways dflags = x
- | "HS" `isPrefixOf` x =
+ | WayDyn `Set.notMember` ways dflags = x
+ | "HS" `isPrefixOf` x =
x ++ '-':programName dflags ++ projectVersion dflags
-- For non-Haskell libraries, we use the name "Cfoo". The .a
-- file is libCfoo.a, and the .so is libfoo.so. That way the