http://hackage.haskell.org/trac/haskell-prime/wiki/ImportShadowing

I agree. It is very tiresome and confusing, because when you say, in your module "M", "M.nub", M doesn't necessarily even export nub, nor did you "import M as M", so it's an odd sort of self-reference. Also that self-reference is banned in some places (maybe, left-hand-sides of definitions?) and required in others (when used when also imported). The "required" part would be mitigated by the proposal.

It's probably somewhat more worth warning about when the import was explicit as well as unqualified, e.g.
import Data.List (nub)
than from merely
import Data.List

But it's a little confusing, because you can define methods in instances (e.g. Category's id and (.)), but I don't think instance definitions would be affected by the proposal -- only class definitions would.

-Isaac
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to