On Fri, 9 May 2008, Andrew Coppin wrote:
Brent Yorgey wrote:
On Fri, May 9, 2008 at 10:02 AM, Andrew Coppin <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
While I'm here - I'm aware of how you control importing [or not]
from the Prelude. Is there a way that I can, for example, import
all the stuff like the basic types, classes, etc., but *not* all
the list-related stuff? Or is the Prelude not that modular?
Not only is the Prelude not that modular, there's not really any mechanism
to make it so. There's no way to partition an export list in such a way
that whole chunks of it can be imported/not imported at a go. Would that
be a nice feature? I don't know, possibly.
Well, if the Prelude was split into several seperate modules, you could
import just the modules you wanted. That sounds pretty easy to me. [I mean,
apart from the minor detail that no current implementation works this way...]
I think, Prelude is meant as one monolithic module and it should be
certainly the only one from which all identifiers are anonymously imported
in an unqualified way. (In order to avoid name clashes.)
http://www.haskell.org/haskellwiki/Import_modules_properly
Actually, Prelude exports some identifiers, that can be also imported
from more specific modules like Text.Show, Data.List.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe