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 to list all names
Heinrich Apfelmus wrote:
Lennart Augustsson 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 Haskell's scoping rules.
The change is quite simple. As it is, top level entities
Lennart Augustsson 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 Haskell's scoping rules.
The change is quite simple. As it is, top level entities in a module
are in the sa
My point is that if you would rather not get that error when J changes,
you need to use explicit import lists:
Module M
import I (foo)
import J ()
definitioninModuleM = foo
Lennart's proposed change makes explicit import lists unnecessary for
the case where foo is defined inside M rat
"Sittampalam, Ganesh" :
> 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.
If you use, but do not define foo, then you definitely want to get an error