[GHC] #9990: Top level module identifiers shadow imported identifiers
GHC
ghc-devs at haskell.org
Tue Jan 20 20:18:43 UTC 2015
#9990: Top level module identifiers shadow imported identifiers
-------------------------------------+-------------------------------------
Reporter: drb226 | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by alexey_r):
Slight extension suggestion: include explicitly imported identifiers
together with top-level identifiers. So:
1. if an identifier is imported both explicitly and implicitly, there is
no ambiguity;
2. if an identifier is imported explicitly and defined at top-level, there
is an ambiguity.
Identifiers brought into scope by a `(..)` aren't considered explicitly
imported for this purpose (otherwise extending a module could silently
change meaning of an identifier).
As a side effect, many uses of `hiding` would be no longer necessary.
Of course, the pragma's name would have to be changed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9990#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list