I don't have a good answer here. FWIW
* I believe that the only call to mkTopLevEnv is in
InteractiveEval.findGlobalRdrEnv,
which in turn only calls mkTopLev on imports which are specified by an
IIModule
specification (see HscTypes.InteractiveImport).
* I think that IIModule things should
Thanks, Simon.
I will work on building a smaller complete test case that reproduces the
issue, and I could have done a better job of at least pointing out the
relevant code for you. Sorry about that.
I'm definitely not building my own IIModule. The use of the GHC API is
as follows. (I'm