
26 Mar
2007
26 Mar
'07
10:30 p.m.
Sebastian Sylvan wrote:
The solution is simple:
* If there is a "module M where" clause in the beginning of the file, then it's a "proper" module and shouldn't import the Prelude. * If there is no module declaration then it's a "quick'n dirty script" and should have the Prelude implicitly imported. * Interactive interpreters should probably import the Prelude.
That should take of most issues.
I think this is ideal. I've always thought writing "import Prelude" was a good idea if one wants one's module to import the Prelude. It's one less corner case. -- Ashley Yakeley