#4176: reject unary minus in infix left hand side function bindings that resolve
differently as expressions
---------------------------+------------------------------------------------
  Reporter:  maeder        |          Owner:                   
      Type:  bug           |         Status:  new              
  Priority:  normal        |      Milestone:  7.2.1            
 Component:  Compiler      |        Version:  7.2.1            
Resolution:                |       Keywords:  fixity resolution
  Testcase:                |      Blockedby:                   
Difficulty:                |             Os:  Unknown/Multiple 
  Blocking:                |   Architecture:  Unknown/Multiple 
   Failure:  None/Unknown  |  
---------------------------+------------------------------------------------

Comment(by igloo):

 Aha, I think you're right:
 {{{
 > resolve [TNeg, TExp (Var "one"), TOp (Op "##" 7 Nonfix), TExp (Var
 "zero")]
 Just (Neg (OpApp (Var "one") (Op "##" 7 Nonfix) (Var "zero")))
 }}}
 so it should parse as the illegal
 {{{
 - (1 ## 0) = 0
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4176#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to