Skip to content

Commit c84ab43

Browse files
committed
Reuse hasThreaded
1 parent aaee425 commit c84ab43

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Cabal/src/Distribution/Simple/GHCJS.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import Distribution.Utils.NubList
8585
import Distribution.Utils.Path
8686
import Distribution.Verbosity (Verbosity)
8787
import Distribution.Version
88+
import Distribution.Simple.GHC.Build.Link (hasThreaded)
8889

8990
import Control.Arrow ((***))
9091
import Control.Monad (msum)
@@ -1770,7 +1771,7 @@ getRPaths _ _ = return mempty
17701771
popThreadedFlag :: BuildInfo -> (BuildInfo, Bool)
17711772
popThreadedFlag bi =
17721773
( bi{options = filterHcOptions (/= "-threaded") (options bi)}
1773-
, hasThreaded (options bi)
1774+
, hasThreaded bi
17741775
)
17751776
where
17761777
filterHcOptions
@@ -1780,9 +1781,6 @@ popThreadedFlag bi =
17801781
filterHcOptions p (PerCompilerFlavor ghc ghcjs) =
17811782
PerCompilerFlavor (filter p ghc) ghcjs
17821783

1783-
hasThreaded :: PerCompilerFlavor [String] -> Bool
1784-
hasThreaded (PerCompilerFlavor ghc _) = "-threaded" `elem` ghc
1785-
17861784
-- | Extracts a String representing a hash of the ABI of a built
17871785
-- library. It can fail if the library has not yet been built.
17881786
libAbiHash

0 commit comments

Comments
 (0)