diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-07-20 11:38:18 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-07-26 11:45:43 +0100 |
commit | 9f807a79217f122abcc770ffc7ab21e24500cf35 (patch) | |
tree | c71846af9d4d7b276f02e4ba2067e1ac3083180f | |
parent | 25c24535ad51aa22b9cae425c6ac4ad9a8f1e1e9 (diff) | |
download | haskell-9f807a79217f122abcc770ffc7ab21e24500cf35.tar.gz |
Force safeInferred to avoid retaining extra copy of DynFlags
This will only have a (very) modest impact on memory but we don't want
to retain old copies of DynFlags hanging around so best to force this
value.
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 061209d315..400652da0e 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -1946,7 +1946,8 @@ safeFlagCheck cmdl dflags = " must be specified with a Safe Haskell flag"] -- Have we inferred Unsafe? See Note [Safe Haskell Inference] in GHC.Driver.Main - safeFlags = all (\(_,_,t,_) -> not $ t dflags) unsafeFlagsForInfer + -- Force this to avoid retaining reference to old DynFlags value + !safeFlags = all (\(_,_,t,_) -> not $ t dflags) unsafeFlagsForInfer {- ********************************************************************** |