diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-10-11 17:04:13 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-12 19:17:15 -0400 |
commit | 82938981a7916c2747ee3b97624c55f7c5467c84 (patch) | |
tree | 677897f67e685f5b45488e314738e59bdd9c3b96 | |
parent | c2ce1b178575abc0cc37a6c232502644c9d863ac (diff) | |
download | haskell-82938981a7916c2747ee3b97624c55f7c5467c84.tar.gz |
Force name_exe field to avoid retaining entire UnitEnv (including whole HPT)
Not forcing this one place will result in GHCi using 2x memory on a
reload.
-rw-r--r-- | compiler/GHC/Driver/Make.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs index 362303a5c8..8918ca1d34 100644 --- a/compiler/GHC/Driver/Make.hs +++ b/compiler/GHC/Driver/Make.hs @@ -697,11 +697,11 @@ guessOutputFile = modifySession $ \env -> ml_hs_file (ms_location ms) name = fmap dropExtension mainModuleSrcPath - name_exe = do + !name_exe = do -- we must add the .exe extension unconditionally here, otherwise -- when name has an extension of its own, the .exe extension will -- not be added by GHC.Driver.Pipeline.exeFileName. See #2248 - name' <- if platformOS platform == OSMinGW32 + !name' <- if platformOS platform == OSMinGW32 then fmap (<.> "exe") name else name mainModuleSrcPath' <- mainModuleSrcPath |