infelicity in module imports
Thu, 5 Jul 2001 10:59:52 +0100
> In short, an import *always* brings the entire *qualified* set
> of names into scope. Hiding and revealing applies only to
> unqualified names.
I agree with SimonM that this is not what the Report says. At one time
it may have done, but careful reading shows that only the qualified
names for _explicitly_named_ impspecs are brought into scope.
> I must say that I thought GHC implemented
> this rule; if not I should fix it.
As SimonM points out, if that is the rule then _all_ impspecs (both
explicit namings and hidings) on an `import qualified' are ignored,
so we should delete them from the grammar.
> As to whether this is a good design, I'm sure one could suggest others,
> but I'm very strongly biased against fixing anything that is not a Bug.
No matter which of the interpretations of the current Report (so far
mentioned on the list) we choose, they all have design inconsistencies.
So I think we need to correct the design. SimonM's suggested fix
leads to the most intuitive interpretation I think.