Ross Paterson wrote:
>
> On Wed, Jan 19, 2000 at 03:18:34PM -0700, Joe Fasel wrote:
> > *Sigh* And the language named in honor of Haskell Curry
> > for which Currying is not a valid transformation strikes
> > again!
>
> Worse, not only are the built-in product and function types lifted,
> but one can't define the unlifted ones. Before Haskell 1.3, even though
> the built-in product was lifted, one could define pairs as an abstract
> type exporting functions to make pairs and extract their components,
> which would then behave as true products. But then seq was introduced
> (and in Haskell 98 extended to type variables) so everything is lifted.
>
> Can we have extensional products and functions (or at least the means
> to define them) please?
Just to add my vote: Yes, please give us these! I'm working on a program
transformation system for a subset of Haskell. But it's not really a
subset of Haskell, it has true products and functions. This is because
to do without them means either that I have to jettison lots of laws and
equivalences or that I have to transform using "partial correctness"
---equivalence modulo termination---rather than "total correctness": yuck).
Most people I've talked to consider lifted products a mistake.
(This may not mean that most consider it a mistake, maybe only that
those who have disagreed have not bothered to tell me so.)
Numerous others are unaware that products are lifted in Haskell!
A while back, I asked John Peterson about the history of lifted products
in Haskell. He told me that the decision was based on pragmatics
(not semantics or efficiency): that it was simpler for implementations
to represent an n-tuple as an n-ary constructor than to add an extra
construct to the language (am I quoting you correctly, John?).
- Mark Tullsen