Fixity was: Negation

Christian Maeder Christian.Maeder at dfki.de
Sun Feb 14 10:52:49 EST 2010


Christian Maeder schrieb:
> S. Doaitse Swierstra schrieb:
>> weird :: Int -> Int
>> weird = (if True then 3 else 5+)

[...]

> infixexp -> fexp qop infixexp
>            | exp10

This is no good, because it would exclude:

   do ...
 ++ do

expressions.

> It would be even possible to avoid parenthesis around sections, because
> a leading or trailing operator (or just a single operator) uniquely
> determines the kind of expression.

Maybe this is a solution to the above problem, because "5+" could be
legally parsed (and only rejected during type inference).

C.



More information about the Haskell-prime mailing list