
There was some debate about which to have - it's a matter of personal preference and style. The problem is that if you have both let and where in the expression syntax, then
let a in b where c
is ambiguous unless you make an arbitrary decision about the precedence,
Was it not considered to forbid such ambiguous expressions, requiring explicit parentheses to resolve the ambiguity? Norman, who sometimes wishes `where' were a postfix `let', and not part of the declaration syntax (though he does not wish to give up scoping over multiple guards).

Norman Ramsey wrote:
Was it not considered to forbid such ambiguous expressions, requiring explicit parentheses to resolve the ambiguity?
Yes. At one time some expressions using infix operators at the same precedence had to be parenthesised if there was no "natural" associativity familiar from mathematics.
From memory I think a `mod` b * c is an example. This caused some complaints and was quietly dropped.
For let/where, my recollection is that the issue was raised and the solution agreed on the same day at one of the Glasgow meetings in '88. After that it was outside the domain of potentially ambiguous expression constructs and was not considered further. --brian
participants (2)
-
Brian Boutel
-
Norman Ramsey