| ... | @@ -111,7 +111,7 @@ x8 = - 4 # 5 # 6 |
... | @@ -111,7 +111,7 @@ x8 = - 4 # 5 # 6 |
|
|
|
|
|
|
|
|
|
|
|
|
x8 will be resolved as "(- 4) \# (5 \# 6)" like it would for any right-associative operator \# with lower precedence, too. For any
|
|
x8 will be resolved as "(- 4) \# (5 \# 6)" like it would for any right-associative operator \# with lower precedence, too. For any
|
|
|
*non-associative* operator \# "- 4 \# 5 \# 6" is rejected like "4 \# 5 \# 6" or "-(4 \# 5 \# 6)" would be.
|
|
*non-associative* operator \# "- 4 \# 5 \# 6" is rejected like "4 \# 5 \# 6", "-(4 \# 5 \# 6)" or "(-4) \# 5 \# 6" would be.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ... | @@ -208,3 +208,7 @@ haskellch4.html\#x10-820004.4.2 "4.4.2 Fixity Declarations" states: |
... | @@ -208,3 +208,7 @@ haskellch4.html\#x10-820004.4.2 "4.4.2 Fixity Declarations" states: |
|
|
This (surprisingly) makes "`- a `f` b`" resolve as "`- (a `f` b)`" for any f without fixity declaration (independent of this proposal). This contradicts [NegationBindsTightly](negation-binds-tightly).
|
|
This (surprisingly) makes "`- a `f` b`" resolve as "`- (a `f` b)`" for any f without fixity declaration (independent of this proposal). This contradicts [NegationBindsTightly](negation-binds-tightly).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
But as a compromise it is also an option to simple reject terms where prefix minus would not bind tightly (enough), which makes sense for `-a ^ b` and would force us to write `-(a ^ b)` or `(-a) ^ b` explicitly. (Of course one would not want to reject "-a \* b", no matter how it is resolved.)
|
|
|
|
|
|
|
|
|