
It should be good enough (for what you're talking about) to hide them all.
Turn
import A (foo)
import B (bar)
import C hiding (baz)
import D
into
import A (foo)
import B (bar)
import C hiding (foo,bar,baz)
import D hiding (foo,bar)
There's no reason to worry about hiding nonexistent identifiers, I don't
think.
On Thu, Oct 16, 2014 at 7:10 PM, htebalaka
Well I suppose tooling might need to be aware of the feature depending on what it does, but I don't see why the code actually typechecking would need to be dependent on ordering. When I say shadowing I don't mean explicitly having any explicit import create a new scope, since in that case it would be sensitive to re-ordering, which I agree would be bad. My thought would be first you would need to parse all the imports to see which identifiers they import, then do another pass to change the imports to hide any identifiers that should be shadowed.
So in the example I gave you would need to be aware that Foo exports x, because otherwise there would be no way to know that x needs to be hidden from Bar. I assume GHC already would have access to that information though.
-- View this message in context: http://haskell.1045720.n5.nabble.com/Hiding-import-behaviour-tp5758155p57581... Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com. _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users