| Can we have extensional products and functions (or at least the means
| to define them) please?
Does anyone want to come up with a concrete language proposal?
Language issues
~~~
A significant difficulty is that seq is essentially un-implementable
for unlifted products (requires
| Can we have extensional products and functions (or at least the means
| to define them) please?
Language issues
~~~
A significant difficulty is that seq is essentially un-implementable
for unlifted products (requires parallelism).
Well, all you need is an evaluation with a
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.
).
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 Peters
Folks,
I claimed that these are different functions:
partition1 p xs = (filter p xs, filter (not . p) xs)
partition2 p = foldr (\x (ys, zs) - if p x then (x:ys,zs) else (ys,x:zs))
([],[])
I was correct, but not for the reason I thought. Nota bene:
partition1 p
Did I reach the whole list?
My question concerns this:
Furthermore, it makes perfect sense to declare a new type isomorphic to
an existing function type. So whereas it is *not* ok to write
data New a b = MkNew !(a-b)-- ! means strict
(because of previous discussion
I don't like Phil's suggestion to have non-lifted products:
* It messes up the uniform semantics for algebraic data types (all lifted).
For example
a) You have to explain that
f ~(z,a) = ... is the same as f (z,a) = ...
but
g ~(z:a
Oops! I should have underlined in my last message where I wrote
`newtype' instead of `datatype'. As a result, Simon seems to have
completely misunderstood my proposal. Sorry about that.
Simon seems to think I am proposing that if one writes
datatype T a_1 ... a_k = C t_1 ... t_n