Chad Scherrer wrote:
There must be a subtlety I'm missing, right?
What if the types are not instances of Eq?
Jason
Thanks, I figured it was something simple. Now I just to convince
myself there's no way around that. Is there a proof around somewhere?
Yes, there is a proof that
seq ::
I was reading on p. 29 of A History of Haskell (a great read, by the
way) about the controversy of adding seq to the language. But other
than for efficiency reasons, is there really any new primitive that
needs to be added to support this?
As long as the compiler doesn't optimize it away, why
On 9/27/06, Chad Scherrer [EMAIL PROTECTED] wrote:
I was reading on p. 29 of A History of Haskell (a great read, by the
way) about the controversy of adding seq to the language. But other
than for efficiency reasons, is there really any new primitive that
needs to be added to support this?
As
There must be a subtlety I'm missing, right?
What if the types are not instances of Eq?
Jason
Thanks, I figured it was something simple. Now I just to convince
myself there's no way around that. Is there a proof around somewhere?
--
Chad Scherrer
Time flies like an arrow; fruit flies
Chad Scherrer wrote:
I was reading on p. 29 of A History of Haskell (a great read, by the
way) about the controversy of adding seq to the language. But other
than for efficiency reasons, is there really any new primitive that
needs to be added to support this?
As long as the compiler
Chad Scherrer wrote:
Prelude let sq x y = if x == x then y else y
Prelude 1 `sq` 2
2
Prelude (length [1..]) `sq` 2
Interrupted.
There must be a subtlety I'm missing, right?
Two, at least:
First, your sq has a different type, as it requires an Eq instance:
Prelude :t sq
sq :: (Eq a) = a -