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

2001-09-24 Thread Simon Peyton-Jones
The Report quite deliberately does not allow you to write the type constructors for built-in syntax in import or export lists. The idea is that the types [Int] and [] Int always mean "list of Int" regardless of what module fiddling you have done. So [] is not an ordinary type constru

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

2001-09-21 Thread Marcin 'Qrczak' Kowalczyk
20 Sep 2001 12:37:36 -0600, Alastair David Reid <[EMAIL PROTECTED]> 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

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

2001-09-21 Thread Marcin 'Qrczak' Kowalczyk
Thu, 20 Sep 2001 13:32:54 +0100, Simon Marlow <[EMAIL PROTECTED]> pisze: > (:) is allowed in an export list; it is just a normal operator. Not quite, it's a reservedop. "Notice that a colon by itself, ":", is reserved solely for use as the Haskell list constructor; this makes its treatment unifo

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

2001-09-21 Thread Simon Peyton-Jones
It's hard to distinguish a constructor from a class in an export list. S | -Original Message- | From: Alastair David Reid [mailto:[EMAIL PROTECTED]] | Sent: 20 September 2001 19:38 | To: Simon Marlow | Cc: Ian Lynagh; [EMAIL PROTECTED]; [EMAIL PROTECTED] | Subject: Re: Prelud

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

2001-09-20 Thread Alastair David Reid
> 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 per

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

2001-09-20 Thread Simon Marlow
Ian Lynagh writes: > On Thu, Sep 20, 2001 at 01:32:54PM +0100, Simon Marlow wrote: > > (:) is allowed in an export list; it is just a normal operator. > > An export is > > export -> qvar >| qtycon [(..) | ( qcname1 , ... , qcnamen )] (n>=0) >| qtycls [(..) | ( qvar1 , ... , q

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

2001-09-20 Thread Ian Lynagh
On Thu, Sep 20, 2001 at 01:32:54PM +0100, Simon Marlow wrote: > > > As far as I can tell, the report doesn't allow (:) or []((:), > > []) in the > > export list, yet the hugs prelude has the first and the GHC > > prelude has > > the second. Have I missed something that allows them or is > > th

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

2001-09-20 Thread Simon Marlow
> As far as I can tell, the report doesn't allow (:) or []((:), > []) in the > export list, yet the hugs prelude has the first and the GHC > prelude has > the second. Have I missed something that allows them or is > this a bug in > the preludes or the report? (:) is allowed in an export list;