[Haskell-cafe] Showing the 1 element tuple

Marc A. Ziegert coeus at gmx.de
Tue Dec 19 22:51:15 EST 2006

> A weird question, what does the 1 element tuple look like?

there is one in Control.Monad.Identity:
 Identity 1
i miss the short version
 newtype Id x = x

writing (1,) is not that well defined; how do you want to use its constructor alone?
writing (1;) may be the solution, i think. (;) could be the constructor.
does anyone know, how ";" could cause any problems?
if i am not mistaken, (do return 1 ; return 2;) should be the same like ((do return 1 ; return 2);).

- marc

More information about the Haskell-Cafe mailing list