[Haskell-cafe] Re: Fwd: Is () a 0-length tuple?

2009-11-08 Thread Jon Fairbairn
Pasqualino \Titto\ Assini tittoass...@gmail.com writes: The syntax is similar, but what else is? What would you expect from an empty tuple? (a,b,c) has a constructor function p3 a b c = (a,b,c) and three destructor functions s3_1 (a,b,c) = a, s3_2 (a,b,c) = b and s3_3 (a,b,c)=c (a,b) has a

Re: [Haskell-cafe] Re: Fwd: Is () a 0-length tuple?

2009-11-08 Thread Ketil Malde
Jon Fairbairn jon.fairba...@cl.cam.ac.uk writes: The empty type in Haskell would be (forall a.a) which has no non-bottom values. With an extension, you can also define: data Void -- without any constructors which is perhaps closer to null types in other languages? -k -- If I haven't