Why the Prelude must die
ashley at semantic.org
Mon Mar 26 18:30:31 EDT 2007
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.
More information about the Libraries