diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2022-12-07 19:24:59 +0530 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2023-01-03 12:22:11 +0000 |
commit | 62b9a7b23b20f5cf0a2de14251c2096098009f10 (patch) | |
tree | 425f6509a48e28c41bdbaff2e7fba6f6749eff8f /compiler/GHC/Driver | |
parent | a5bd0eb8dd1d03c54e1b0b476ebbc4cc886d6f19 (diff) | |
download | haskell-62b9a7b23b20f5cf0a2de14251c2096098009f10.tar.gz |
Force the Docs structure to prevent leaks in GHCi with -haddock without -fwrite-interfacewip/force-docs
Involves adding many new NFData instances.
Without forcing Docs, references to the TcGblEnv for each module are retained
by the Docs structure. Usually these are forced when the ModIface is serialised
but not when we aren't writing the interface.
Diffstat (limited to 'compiler/GHC/Driver')
-rw-r--r-- | compiler/GHC/Driver/Flags.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs index f45397d887..ed77b81ebd 100644 --- a/compiler/GHC/Driver/Flags.hs +++ b/compiler/GHC/Driver/Flags.hs @@ -26,6 +26,7 @@ import GHC.Utils.Outputable import GHC.Utils.Binary import GHC.Data.EnumSet as EnumSet +import Control.DeepSeq import Control.Monad (guard) import Data.List.NonEmpty (NonEmpty(..)) import Data.Maybe (fromMaybe,mapMaybe) @@ -40,6 +41,9 @@ instance Binary Language where put_ bh = put_ bh . fromEnum get bh = toEnum <$> get bh +instance NFData Language where + rnf x = x `seq` () + -- | Debugging flags data DumpFlag -- See Note [Updating flag description in the User's Guide] |