Prelude and (:) and []((:), []) bugs?

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
21 Sep 2001 16:47:24 GMT


20 Sep 2001 12:37:36 -0600, Alastair David Reid <reid@cs.utah.edu> pisze:

>> Ah, I forgot that you can't export a constructor on its own.  
> 
> You can't?
> 
> I probably knew this once but looking at it now, it seems kinda
> surprising.  Haskell's module system is supposed to be just namespace
> control --nothing more-- so why is it preventing me from doing
> something which is perfectly safe and well-defined?

It's ambiguous whether you mention a value constructor or a type
constructor / class. They are in separate namespaces and distinguished
by context in normal source, but the export list doesn't provide
the context.

There is a strange exception that you can *hide* value constructors
directly. Hiding a name beginning with uppercase applies to all
relevant namespaces.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK