On Sat, Sep 10, 2005 at 03:18:16PM -0000, [EMAIL PROTECTED] wrote:
> I previously thought that rewriting
>
> let <a> = <b>
> <c> = <d> in <e>
>
> as
>
> let (<a>,<c>) = (<b>,<d>) in <e>
>
> is harmless, but section 3.12 of the Report says different.
Yes, you'd have to write it as
let (~<a>,~<c>) = (<b>,<d>) in <e>
> I still don't understand why
>
> main = print (let (x,(q,_)) = (1,divMod x x) in q)
>
> and
>
> main = print (let (x,(q,_)) = (1,divmod x x) in q)
> divmod x y = (div x y,mod x y)
>
> behave differently.
In both cases, to for x is to ask for the rhs to be reduced to the form
(<a>,(<b>,<c>)). In the former case this can't be done without knowing
the value of x; in the latter it can.
_______________________________________________
Hugs-Bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/hugs-bugs