[Haskell-cafe] Re: Interesting critique of Haskell

Henning Thielemann lemming at henning-thielemann.de
Fri May 9 17:17:44 EDT 2008


On Fri, 9 May 2008, Andrew Coppin wrote:

> Brent Yorgey wrote:
>> 
>> On Fri, May 9, 2008 at 10:02 AM, Andrew Coppin <andrewcoppin at btinternet.com 
>> <mailto:andrewcoppin at btinternet.com>> 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.


More information about the Haskell-Cafe mailing list