[GHC] #10269: ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses

#10269: ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple ApiAnnotations | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- The RdrHsSyn.isFunLhs function has the following {{{#!hs isFunLhs e = go e [] where go (L loc (HsVar f)) es | not (isRdrDataCon f) = return (Just (L loc f, False, es)) go (L _ (HsApp f e)) es = go f (e:es) go (L _ (HsPar e)) es@(_:_) = go e es }}} The treatment of `HsPar` means that any parentheses around an infix function will be discarded. e.g. {{{#!hs (f =*= g) sa i = f (toF sa i) =^= g (toG sa i) }}} will lose the `(` before `f` and the closing one after `g` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10269 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10269: ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | ApiAnnotations Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by alanz): See `RdrHsSyn.checkTyClHdr` for an example of how to handle this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10269#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10269: ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | ApiAnnotations Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: Phab:D832 -------------------------------------+------------------------------------- Changes (by alanz): * differential: => Phab:D832 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10269#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10269: ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: patch Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | ApiAnnotations Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: Phab:D832 -------------------------------------+------------------------------------- Changes (by alanz): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10269#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10269: ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses
-------------------------------------+-------------------------------------
Reporter: alanz | Owner: alanz
Type: bug | Status: patch
Priority: normal | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | ApiAnnotations
Type of failure: None/Unknown | Architecture:
Blocked By: | Unknown/Multiple
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions: Phab:D832
-------------------------------------+-------------------------------------
Comment (by Alan Zimmerman

#10269: ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: closed Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | ApiAnnotations Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: Phab:D832 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed Comment: Merged to `ghc-7.10`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10269#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC