RE: Proposal: Scoping rule change

2012-07-27 Thread Sittampalam, Ganesh
: Scoping rule change Hello, I also think that this is a good idea. To address Manuel's nitpick, here is an example that would break if `I` starts exporting `foo`. module M(foo) where import I foo = True To Ganesh's point: I think that this change would be useful, even if one is willing

Re: Proposal: Scoping rule change

2012-07-25 Thread Manuel M T Chakravarty
Nitpick: Your example actually does not lead to an error with GHC, as you define, but do not use 'foo' in M. Names (like classes) only clash when you look them up. Manuel Lennart Augustsson lenn...@augustsson.net: It's not often that one gets the chance to change something as fundamental as

Re: Proposal: Scoping rule change

2012-07-25 Thread Manuel M T Chakravarty
of future name clashes – given that, does this change buy much? From: haskell-prime-boun...@haskell.org [mailto:haskell-prime-boun...@haskell.org] On Behalf Of Lennart Augustsson Sent: 24 July 2012 02:29 To: Haskell Prime Subject: Proposal: Scoping rule change It's not often that one

RE: Proposal: Scoping rule change

2012-07-25 Thread Sittampalam, Ganesh
The ... foo ... in my example was intended to show that module M does look up 'foo'. From: Manuel M T Chakravarty [mailto:c...@cse.unsw.edu.au] Sent: 25 July 2012 08:26 To: Sittampalam, Ganesh Cc: Lennart Augustsson; Haskell Prime Subject: Re: Proposal: Scoping rule change If Lennart's

RE: Proposal: Scoping rule change

2012-07-25 Thread Sittampalam, Ganesh
: Proposal: Scoping rule change Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com: The ... foo ... in my example was intended to show that module M does look up 'foo'. I did read that as foo is both defined and used in the body. In that case, everything should work just fine

RE: Proposal: Scoping rule change

2012-07-24 Thread Sittampalam, Ganesh
: Scoping rule change It's not often that one gets the chance to change something as fundamental as the scoping rules of a language. Nevertheless, I would like to propose a change to Haskell's scoping rules. The change is quite simple. As it is, top level entities in a module are in the same

Re: Proposal: Scoping rule change

2012-07-24 Thread Edward Kmett
+1 from me I can't count the number of times I've had this bite me when writing ByteString-like APIs that pun names from the Prelude. On Jul 23, 2012, at 8:28 PM, Lennart Augustsson lenn...@augustsson.net wrote: It's not often that one gets the chance to change something as fundamental as

Proposal: Scoping rule change

2012-07-23 Thread Lennart Augustsson
It's not often that one gets the chance to change something as fundamental as the scoping rules of a language. Nevertheless, I would like to propose a change to Haskell's scoping rules. The change is quite simple. As it is, top level entities in a module are in the same scope as all imported

Re: Proposal: Scoping rule change

2012-07-23 Thread Greg Weber
sounds good. will there be a shadowing warning? On Mon, Jul 23, 2012 at 5:28 PM, Lennart Augustsson lenn...@augustsson.net wrote: It's not often that one gets the chance to change something as fundamental as the scoping rules of a language. Nevertheless, I would like to propose a change to

Re: Proposal: Scoping rule change

2012-07-23 Thread Lennart Augustsson
An optional shadowing warning (for the paranoid) seems reasonable. On Tue, Jul 24, 2012 at 1:45 AM, Greg Weber g...@gregweber.info wrote: sounds good. will there be a shadowing warning? On Mon, Jul 23, 2012 at 5:28 PM, Lennart Augustsson lenn...@augustsson.net wrote: It's not often that