summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules.hs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2022-04-12 12:41:47 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-14 08:19:16 -0400
commit426ec4461c1723a8fe4be97404c7e6c10a10cee5 (patch)
tree4bd4833c641b6362a27bf0d0c92fb3b49d452222 /hadrian/src/Rules.hs
parentdf893f6667b31946ae7995150a6a5920602f7b0b (diff)
downloadhaskell-426ec4461c1723a8fe4be97404c7e6c10a10cee5.tar.gz
Hadrian: use a set to keep track of ways
The order in which ways are provided doesn't matter, so we use a data structure with the appropriate semantics to represent ways. Fixes #21378
Diffstat (limited to 'hadrian/src/Rules.hs')
-rw-r--r--hadrian/src/Rules.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/hadrian/src/Rules.hs b/hadrian/src/Rules.hs
index fc85d1d698..521c0ac154 100644
--- a/hadrian/src/Rules.hs
+++ b/hadrian/src/Rules.hs
@@ -1,6 +1,8 @@
module Rules (buildRules, oracleRules, packageTargets, topLevelTargets
, toolArgsTarget ) where
+import qualified Data.Set as Set
+
import qualified Hadrian.Oracles.ArgsHash
import qualified Hadrian.Oracles.Cabal.Rules
import qualified Hadrian.Oracles.DirectoryContents
@@ -90,7 +92,7 @@ packageTargets includeGhciLib stage pkg = do
then do -- Collect all targets of a library package.
let pkgWays = if pkg == rts then getRtsWays else getLibraryWays
ways <- interpretInContext context pkgWays
- libs <- mapM (pkgLibraryFile . Context stage pkg) ways
+ libs <- mapM (pkgLibraryFile . Context stage pkg) (Set.toList ways)
more <- Rules.Library.libraryTargets includeGhciLib context
setupConfig <- pkgSetupConfigFile context
return $ [setupConfig] ++ libs ++ more