Quantcast

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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Simon Marlow-5
Fri Nov 21 00:46:48 PST 2008  Simon Marlow <[hidden email]>
  * Add simonpj's ImportShadowing proposal

    M ./status.hs +5

View patch online:
http://darcs.haskell.org/haskell-prime-status/_darcs/patches/20081121084648-12142-366f7d72d3fc6ad4a6dee06c87983ac9aea7a981.gz
_______________________________________________
Haskell-prime mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-prime
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: .. Add simonpj's ImportShadowing proposal

Isaac Dupree
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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-prime
Loading...