Changes between Version 3 and Version 4 of PrefixMinusResolution


Ignore:
Timestamp:
Jul 13, 2010 4:15:04 PM (4 years ago)
Author:
maeder
Comment:

added report delta

Legend:

Unmodified
Added
Removed
Modified
  • PrefixMinusResolution

    v3 v4  
    6464For other examples see 
    6565http://www.haskell.org/pipermail/haskell-prime/2010-July/003229.html 
     66(it also shows how easy an implementation is) 
    6667 
    6768Mixfix analysis [Aasa95] usually only considers the top-level operators of argument terms. 
     
    7576== Report Delta == 
    7677 
     78In 
     79http://www.haskell.org/onlinereport/haskell2010/ 
     80 
     81remove "same precedence" stuff 
     82 
     83haskellch3.html#x8-220003 
     84"Negation is the only prefix operator in Haskell; it has the same precedence as the infix - operator defined in the Prelude (see Section 4.4.2, Figure 4.1)." 
     85 
     86haskellch3.html#x8-280003.4 
     87"Prefix negation has the same precedence as the infix operator - defined in the Prelude (see Table 4.1)" 
     88 
     89Possibly refer to haskellch10.html#x17-17900010.6 "10.6  Fixity Resolution" 
     90 
     91replace: 
     92"The handling of the prefix negation operator, -, complicates matters only slightly. Recall that prefix negation has the same fixity as infix negation: left-associative with precedence 6. The operator to the left of -, if there is one, must have precedence lower than 6 for the expression to be legal. The negation operator itself may left-associate with operators of the same fixity (e.g. +). So for example -a + b is legal and resolves as (-a) + b, but a + -b is illegal." 
     93 
     94with: 
     95"The handling of the prefix negation operator, -, complicates matters only slightly. (Recall that) prefix negation has lower precedence than infix multiplication. The operator to the left of prefix -, if there is one, is ignored. 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." 
     96 
     97(Use may algorithm from http://hackage.haskell.org/trac/ghc/ticket/4180)