patch applied (haskell-prime-status): Add simonpj's ImportShadowing proposal

Fri Nov 21 00:46:48 PST 2008 Simon Marlow

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
participants (2)
-
Isaac Dupree
-
Simon Marlow