ghci: only keep the GlobalRdrEnv in ModInfo
The datatype GHC.UI.Info.ModInfo
used to store a ModuleInfo
,
which includes a TypeEnv
. This can easily cause space leaks as we
have no way of forcing everything in a type environment.
In GHC, we only use the GlobalRdrEnv
, which we can force completely.
So we only store that instead of a fully-fledged ModuleInfo
.
I haven't opened a ticket for this issue yet, but storing a full ModuleInfo
here seems like a liability. However, I'm hesitant to remove it outright in case
users were relying on the presence of the type environment.
Edit: it was pointed out to me that this code is purely internal to GHCi, so there
is no risk of anyone depending on having access to information I am removing.