Theoretical arguments regarding the distinction between lifted vs
unlifted tuples (i.e., any type declaration with single disjunct) are
too esoteric for my taste. However, there are some practical reasons
to choose one over the other.  In the Id implementation, no
distinction is made between lifted and unlifted tuples. The practical
consequence of that decision is that no case statement is compiled for
types with single disjuncts. Tuples are represented in storage without
a tag field, and the compiler eliminates as many tuples as it can at
compile time.

It will be trivial to modify the Id compiler to make a distinction
between lifted and unlifted tuples. However, the price would be
observable inefficiency in a large class of programs. Since I don't
see any practical advantage of making this distinction, I favor
dropping the distinction in Haskell. The only hesitation I have is
that I recall someone (either Simon or Lennart) telling me that their
implementation would be adversely affected if this distinction was
dropped.

One would have thought that the above argument is totally orthogonal
to the arguments regarding stict constructors, but for some (esoteric)
reason the two seem to be linked!

Arvind





Reply via email to