Re: [Haskell-cafe] :, infix operator, infix constructor, et cetera

2007-08-26 Thread Isaac Dupree
Andrew Coppin wrote: Daniel C. Bastos wrote: But that won't compile, because it doesn't obey the syntax rules of Haskell. You could, however, write data List x = x : (List x) | End and it would work. 1 : (2 : (3 : End)) Except that (for no particularly good reason) : is a reserved

Re: [Haskell-cafe] :, infix operator, infix constructor, et cetera

2007-08-26 Thread Andrew Coppin
Isaac Dupree wrote: Andrew Coppin wrote: Daniel C. Bastos wrote: But that won't compile, because it doesn't obey the syntax rules of Haskell. You could, however, write data List x = x : (List x) | End and it would work. 1 : (2 : (3 : End)) Except that (for no particularly good reason)

Re: [Haskell-cafe] :, infix operator, infix constructor, et cetera

2007-08-26 Thread Ian Lynagh
On Sun, Aug 26, 2007 at 01:35:33PM +0100, Andrew Coppin wrote: Isaac Dupree wrote: Except that (for no particularly good reason) : is a reserved symbol Really? That's interesting... AFAIK, according to the Report, it shouldn't be. It is; from

[Haskell-cafe] :, infix operator, infix constructor, et cetera

2007-08-25 Thread Daniel C. Bastos
There is something called infix constructors and something else called infix operators. I'm guessing that an infix operator is really a function, and an infix constructor I don't know what it is. How would you guys describe them? (*) More questions. I learned how to define (++), and then I