From a6989971379c26d8c288551d536149675e009e34 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Thu, 5 Mar 2020 20:44:57 +0100 Subject: Use a Set to represent Ways Should make `member` queries faster and avoid messing up with missing `nubSort`. Metric Increase: hie002 --- compiler/GHC/Driver/MakeFile.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/GHC/Driver/MakeFile.hs') diff --git a/compiler/GHC/Driver/MakeFile.hs b/compiler/GHC/Driver/MakeFile.hs index bbd501fb26..7b621ca3c4 100644 --- a/compiler/GHC/Driver/MakeFile.hs +++ b/compiler/GHC/Driver/MakeFile.hs @@ -20,6 +20,7 @@ import GhcPrelude import qualified GHC import GHC.Driver.Monad import GHC.Driver.Session +import GHC.Driver.Ways import Util import GHC.Driver.Types import qualified SysTools @@ -43,6 +44,7 @@ import System.IO.Error ( isEOFError ) import Control.Monad ( when ) import Data.Maybe ( isJust ) import Data.IORef +import qualified Data.Set as Set ----------------------------------------------------------------- -- @@ -62,8 +64,8 @@ doMkDependHS srcs = do -- way and .o/.hi extensions, regardless of any flags that might -- be specified. let dflags = dflags0 { - ways = [], - buildTag = waysTag [], + ways = Set.empty, + buildTag = waysTag Set.empty, hiSuf = "hi", objectSuf = "o" } -- cgit v1.2.1