I think this is a great idea. I also think it should apply to the name shadowing warning—identifiers imported implicitly should never trigger that.
On Thu, Oct 16, 2014 at 6:19 PM, Malcolm Gooding <goodi...@gmail.com> wrote: > With the prelude changes that people have been discussing recently > I've been wondering is there any reason why importing an identifier > explicitly and unqualified doesn't automatically hide any implicit > imports of the same identifier? Specifically I'm wondering about cases > where you've imported an identifier explicitly from only one module, > like this: > > module Foo (x, ...) where { ... } > module Bar (x, ...) where { ... } > > import Bar > import Foo (x) > > Even if you needed a pragma to enable it I can't think of any sensible > reason why that shouldn't be equivalent to: > > import Bar hiding (x) > import Foo (x) > > I don't know much of GHC's internals, but it seems like a pretty > minimal change. Typing rules remain the same; explicit imports just > shadow implicits. So importing multiple identifiers both implicitly or > both explicitly would remain ambiguous. > _______________________________________________ > Glasgow-haskell-users mailing list > Glasgow-haskell-users@haskell.org > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users >
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users