Use tcRnImports rather than rnImports with GHCi "import" statement: fixes #4832
authorMax Bolingbroke <batterseapower@hotmail.com>
Sun, 3 Apr 2011 15:50:47 +0000 (16:50 +0100)
committerMax Bolingbroke <batterseapower@hotmail.com>
Sun, 3 Apr 2011 15:50:47 +0000 (16:50 +0100)
commit3deca8f44135bd1a146902f498189af00dd4d7b4
treee644c5a87ed09b08cf5166388341c9b9238b9723
parent8c49df053ecee921f7c7385fac1f46f2c5ee69dc
Use tcRnImports rather than rnImports with GHCi "import" statement: fixes #4832

The bug here was that just using rnImports does not ensure that any dependent
orphan modules are loaded, so instances declared by such modules will not be
usable from the GHCi command line after an "import".

This did not affect the :m syntax because it takes a different code path and
uses getModuleExports directly, which contains its own calls to the orphan-module
loading stuff.
compiler/main/HscMain.lhs
compiler/typecheck/TcRnDriver.lhs