
3 Jul
2006
3 Jul
'06
4:04 p.m.
On 7/3/06, David House
On 03/07/06, Neil Mitchell
wrote: In normal Haskell, I tend to view [x] as equivalent to [(x)] (provided that x is not a tuple) but in this case it has a different meaning - albeit both are erronous meanings.
How would tuples make a difference?
[1,2] /= [(1,2)] - the brackets have changed the semantics, because of the tupling. Haskell has two distinct types of brackets, (x) for grouping, (x,y) for tupling. For that reason, there is no way to write the 1 item tuple - despite the fact that some compilers (Yhc/nhc) define and use it internally. Thanks Neil