Simon Peyton-Jones wrote:

> In Haskell,
>         case e of { y->b }
> is equivalent to
>         let y=e in b

Actually, it's equivalent to
  (\ y -> b) e
since the let could be polymorphic.


> That is, case is not strict unless the patterns
> make it so.  You may think it's curious but that's
> the way it is.  I don't have the report to hand
> so I can't give you the page ref.  I forget why
> we defined this semantics using case rather than
> let, which is admittedly odd.  I think there was
> a reason but I don't know what it is.

If case was strict it would allow you to define the seq function.
But seq is not lambda definable, so then Haskell would leave
the realm of lambda definable functions.  This was back in the
days when Haskell didn't have seq...


--

        -- Lennart




Reply via email to