From 63f24a023a4b36c0af086554c4e0f647264beee6 Mon Sep 17 00:00:00 2001 From: Rodrigo Mesquita Date: Wed, 17 Jan 2024 12:56:01 +0000 Subject: [PATCH] format --- Cabal/src/Distribution/Simple/GHC/Build.hs | 10 +++++++--- Cabal/src/Distribution/Simple/GHC/Build/Link.hs | 10 +++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Cabal/src/Distribution/Simple/GHC/Build.hs b/Cabal/src/Distribution/Simple/GHC/Build.hs index 8adc1267220..b6056463f4f 100644 --- a/Cabal/src/Distribution/Simple/GHC/Build.hs +++ b/Cabal/src/Distribution/Simple/GHC/Build.hs @@ -110,9 +110,13 @@ build numJobs pkg_descr = do -- See also Note [Building Haskell Modules accounting for TH] in Distribution.Simple.GHC.Build.Modules wantedWays = Set.fromList $ - [StaticWay | wantStatic || wantVanilla || - -- We build static by default if no other way is wanted - not (wantDynamic || wantProf)] + [ StaticWay + | wantStatic + || wantVanilla + || + -- We build static by default if no other way is wanted + not (wantDynamic || wantProf) + ] <> [DynWay | wantDynamic] <> [ProfWay | wantProf] diff --git a/Cabal/src/Distribution/Simple/GHC/Build/Link.hs b/Cabal/src/Distribution/Simple/GHC/Build/Link.hs index 5a8630d9f02..81c230387c6 100644 --- a/Cabal/src/Distribution/Simple/GHC/Build/Link.hs +++ b/Cabal/src/Distribution/Simple/GHC/Build/Link.hs @@ -116,16 +116,16 @@ linkOrLoadComponent ghcProg pkg_descr extraSources (buildTargetDir, targetDir) ( case what of BuildRepl replFlags -> liftIO $ do let - -- For repl we use the vanilla ghc options + -- For repl we use the vanilla (static) ghc options staticOpts = buildOpts StaticWay replOpts = - vanillaOpts + staticOpts { ghcOptExtra = Internal.filterGhciFlags - (ghcOptExtra vanillaOpts) + (ghcOptExtra staticOpts) <> replOptionsFlags (replReplOptions replFlags) - , ghcOptInputModules = replNoLoad (replReplOptions replFlags) (ghcOptInputModules vanillaOpts) - , ghcOptInputFiles = replNoLoad (replReplOptions replFlags) (ghcOptInputFiles vanillaOpts) + , ghcOptInputModules = replNoLoad (replReplOptions replFlags) (ghcOptInputModules staticOpts) + , ghcOptInputFiles = replNoLoad (replReplOptions replFlags) (ghcOptInputFiles staticOpts) } -- For a normal compile we do separate invocations of ghc for -- compiling as for linking. But for repl we have to do just