• Simon Peyton Jones's avatar
    Simplify handling of the interactive package; fixes Trac #8831 · 28e8d878
    Simon Peyton Jones authored
    This patch is really a fix to the big commint
       Re-work the naming story for the GHCi prompt (Trac #8649)
    which introduced the 'interactive' package
    See Note [The interactive package] in HscTypes
    The original commit set both
      (a) The tcg_mod field of TcGblEnv to 'interactive:Ghci4' (say)
      (b) The thisPackage field of DynFlags to 'interactive'
    But the second step interacts badly with linking.  :loaded modules are
    in the package set by 'thisPackage' (usually 'main'); if you change
    that, then we try to link package 'main', but can't find it, and
    that is what happened in #8831.
    The fix was simple: do (a) but not (b).
    I changed Note [The interactive package] in HscTypes to describe this.
HscMain.hs 64.7 KB