| 63 | | x7 are currently rejected by Hugs and ghc. Two solutions are possible. Since "-" should just bind weaker than multiplication the possibility "-(4 # 5)" cannot be justified, thus "(-4) # 5" should be the unique solution. |
| | 63 | x7 are currently rejected by Hugs and ghc. Two solutions are possible. By accident nhc98 resolves this as "-(4 # 5), because # is not left-associative. |
| | 64 | I think associativity should only matter for two infix operators. Since "-" should just bind weaker than multiplication "(-4) # 5" should be the unique solution! |
| | 65 | |
| | 66 | {{{ |
| | 67 | infixr # 6 |
| | 68 | (#) = (-) |
| | 69 | x8 = - 4 # 5 # 6 |
| | 70 | }}} |
| | 71 | |
| | 72 | x8 will be resolved as "(- 4) # (5 # 6)" like it would for any right-associative operator # with lower precedence, too. For any |
| | 73 | ''non-associative'' operator # "- 4 # 5 # 6" is rejected like "4 # 5 # 6" or "-(4 # 5 # 6)" would be. |