Changes between Version 13 and Version 14 of PrefixMinusResolution
 Timestamp:
 Jul 21, 2010 8:51:59 AM (5 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

PrefixMinusResolution
v13 v14 119 119 (Use the algorithm from http://hackage.haskell.org/trac/ghc/ticket/4180) 120 120 121 === Remark ===122 haskellch4.html#x10820004.4.2 "4.4.2 Fixity Declarations" states:121 === Remarks === 122 1. haskellch4.html#x10820004.4.2 "4.4.2 Fixity Declarations" states: 123 123 124 124 "Any operator lacking a fixity declaration is assumed to be infixl 9" 125 125 126 This (surprisingly) makes "{{{ a `f` b}}}" resolve as "{{{ (a `f` b)}}}" for any f without fixity declaration (independent of this proposal). This contradicts NegationBindsTightly. 126 This (surprisingly) makes "{{{ a `f` b}}}" resolve as "{{{ (a `f` b)}}}" for any f without fixity declaration (independent of this proposal). This contradicts NegationBindsTightly. A fix would be to choose 6 as default precedence. 127 127 128 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.) 128 2. A pattern like "{{{ 1 `f` b}}}" must be rejected for {{{`f`}}} with high precedence (than 6), because prefix minus is only allowed as part of a constant (see http://hackage.haskell.org/trac/ghc/ticket/4176) 129 130 3. 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.)