Changes between Version 8 and Version 9 of PrefixMinusResolution
 Timestamp:
 Jul 14, 2010 8:11:28 AM (7 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

PrefixMinusResolution
v8 v9 15 15 Resolve more prefix minus application unambiguously by: 16 16 17 1. Considering only operators to the right of prefix negation .17 1. Considering only operators to the right of prefix negation (as currently done only by Hugs) 18 18 19 2. Leave prefix minus bind less tight than multiplication .19 2. Leave prefix minus bind less tight than multiplication (as is currently done) 20 20 21 3. Do not consider associativity of prefix minus or (alternative formulation) let prefix minus bind a bit stronger than infix minus. 21 3. one of the following alternative formulations (the essence of this propoasl) 22 23  Do not consider associativity of prefix minus 24  Let prefix minus bind a bit stronger than infix minus 25  Resolve ''all'' prefix minus applications (prior to infix resolution) 26 22 27 23 28 Pro: … … 98 103 with: 99 104 "The handling of the prefix negation operator, , complicates matters only slightly. (Recall that) prefix negation has lower precedence than infix multiplication. So a * b resolves as (a * b) or more importantly `a ^ b` as `(a ^ b)`. Generally, prefix negation extends as long to the right as there are consecutive infix operators with precedences at least as high as multiplication. 100 The operator to the left of prefix , if there is one, is i gnored. So a + b or a * b are legal. Prefix negation binds tighter with infix operators to the right of lower precedence than multiplication. So for example a + b is legal and resolves as (a) + b."105 The operator to the left of prefix , if there is one, is irrelevant for resolution. So a + b or a * b are legal. Prefix negation binds tighter with infix operators to the right of lower precedence than multiplication. So for example a + b is legal and resolves as (a) + b." 101 106 102 107 (Use the algorithm from http://hackage.haskell.org/trac/ghc/ticket/4180)