[GHC] #15527: TypeApplications error message doesn't parenthesize infix name

#15527: TypeApplications error message doesn't parenthesize infix name -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple TypeApplications | Architecture: | Type of failure: Poor/confusing Unknown/Multiple | error message Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- If you compile the following program: {{{#!hs module Bug where f :: (Int -> Int) -> (Int -> Int) -> (Int -> Int) f = (.) @Int }}} You'll get this error: {{{ $ /opt/ghc/8.4.3/bin/ghc Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) Bug.hs:4:6: error: Pattern syntax in expression context: .@Int Did you mean to enable TypeApplications? | 4 | f = (.) @Int | ^^^^^^^^ }}} I was taken aback by this strange `.@` thing before I realized what was actually going on: the error message simply forgot to parenthesize `.`. This is `ppr_expr`'s fault, since it calls `ppr` on an `RdrName` instead of `pprPrefixOcc`. Patch incoming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15527 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15527: TypeApplications error message doesn't parenthesize infix name -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: | TypeApplications Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5071 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D5071 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15527#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15527: TypeApplications error message doesn't parenthesize infix name
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
| TypeApplications
Operating System: Unknown/Multiple | Architecture:
Type of failure: Poor/confusing | Unknown/Multiple
error message | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5071
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Krzysztof Gogolewski

#15527: TypeApplications error message doesn't parenthesize infix name -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: | TypeApplications Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5071 Wiki Page: | -------------------------------------+------------------------------------- Changes (by monoidal): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15527#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15527: TypeApplications error message doesn't parenthesize infix name -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: fixed | Keywords: | TypeApplications Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5071 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged with fb8b2cb11023dd453b22ba49b7535b6ae8a8b506. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15527#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC