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) ":" is a reserved symbol
that always refers to the Prelude list version. You could define a
similar name like:
Really? That's interesting... AFAIK, according to the Report, it
shouldn't be.
I just tested. GHC won't let me, WinHugs will. Hmm...
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe