[GHC] #8639: GHC API `runStmt` overrides qualified import of `it` variable

GHC ghc-devs at haskell.org
Fri Jan 3 16:14:29 UTC 2014


#8639: GHC API `runStmt` overrides qualified import of `it` variable
-------------------------------------+------------------------------------
        Reporter:  agibiansky        |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  GHC API           |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"5dffb4ac14b53362ebe9a67c5c6a01f9c9c25229/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="5dffb4ac14b53362ebe9a67c5c6a01f9c9c25229"
 Refactor the way shadowing in handled in GHCi

 If you say
   ghci> import Foo( T )
   ghci> data T = MkT
   ghci> data T = XXX
 then the second 'data T' should shadow the first.  But the qualified
 Foo.T should still be available.  We really weren't handling this
 correctly at all, resulting in Trac #8639 and #8628 among others

 This patch:

 * Add RdrName.extendGlobalRdrEnv, which does shadowing properly

 * Change HscTypes.icExtendGblRdrEnv (was badly-named icPlusGblRdrEnv)
   to use the new function

 * Change RnNames.extendGobalRdrEnvRn to use the new function

 * Move gresFrom Avails into RdrName
 * Better pprGlobalRdrEnv function in RdrName
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8639#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list