.. Add simonpj's ImportShadowing proposal

Isaac Dupree isaacdupree at charter.net
Thu Nov 27 18:53:51 EST 2008


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.


More information about the Haskell-prime mailing list