| ... | ... | @@ -69,7 +69,7 @@ Cons: |
|
|
|
As described in [NegationBindsTightly](negation-binds-tightly) ghc rejects some terms
|
|
|
|
that are accepted by Hugs and Helium and should not be rejected in general.
|
|
|
|
However, making negation bind more tightly (as jhc does) is not the proposed solution here, because
|
|
|
|
it would (in my eyes) wrongly resolve "`- x ^ 2`" to "`(-1) ^ 2`".
|
|
|
|
it would (in my eyes) wrongly resolve "- x ^ 2" to "(-1) ^ 2".
|
|
|
|
|
|
|
|
|
|
|
|
1. Only operators to the right of prefix negation need to be considered for resolution.
|
| ... | ... | @@ -118,7 +118,7 @@ x8 will be resolved as "(- 4) \# (5 \# 6)" like it would for any right-associati |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Surely, one can always disallow "confusing" resolutions, but if we reject "- 4 \# 5", we can also reject "- 4 - 5" or "`- 4 ^ 5`".
|
|
|
|
Surely, one can always disallow "confusing" resolutions, but if we reject "- 4 \# 5", we can also reject "- 4 - 5" or "- 4 ^ 5".
|
|
|
|
Associativity seems wrong to consider for the unary minus function. (But it is an option to simple use the way of Hugs or nhc98 for ghc, too.)
|
|
|
|
|
|
|
|
|
| ... | ... | |