Fix tracking of what RdrNames are used (fixes Trac #5211)
authorSimon Peyton Jones <simonpj@microsoft.com>
Sat, 11 Jun 2011 13:19:44 +0000 (14:19 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Sat, 11 Jun 2011 13:19:44 +0000 (14:19 +0100)
commit6f60f1f541cafdb3bfdd71d48eb9dd7f0a708bda
tree92c94c5297fb8cd1ab7292081f68dd659d489cba
parent8fb9d66966e99beea793b695edef596ac8d5aea5
Fix tracking of what RdrNames are used (fixes Trac #5211)

The issue here was: what import declaration brings into
scope the 'op here

   import qualified Foo( op )
   import Bar( C(op) )
   instance C Int where
     op = ...

Well, the import of Bar, obviously.  But what if the
import Bar had been
   import Bar( C )
Then the instance is still supposed to work, getting
op from the Foo.op imported from Foo.  (I'm assuming its
the same op, of course.)
compiler/basicTypes/RdrName.lhs
compiler/ghci/Debugger.hs
compiler/rename/RnEnv.lhs