[Haskell] Implicit return values

Vincenzo aka Nick Name vincenzo_mlRE.MOVE at yahoo.it
Mon Jan 26 01:38:01 EST 2004


Alle 00:57, lunedì 26 gennaio 2004, Ben Rudiak-Gould ha scritto:
> Here's a possible syntax. An expression like (123, ^x = "foo") would
> have the type (Integer, ^x :: String), which is like a tuple but with
> all but one of the elements having a name. An expression like
>
>   (123, ^x="foo") - (45, ^x="bar", ^y="baz")
>
> would be converted by the compiler to
>
>   (123 - 45, ^x=("foo" `mappend` "bar"), ^y="baz")

It's unclear to me how would the compiler know that it's not

(123 - 45, ^x=("bar" `mappend` "foo"), ^y="baz")

This depends on order of evaluation or am I wrong? 

V.

-- 
A: Top posting!
Q: What is the most irritating thing on Usenet?




More information about the Haskell mailing list