[GHC] #15236: GHCi pretty-prints (->)'s fixity poorly
#15236: GHCi pretty-prints (->)'s fixity poorly -------------------------------------+------------------------------------- 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 Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Consider the following GHCi session: {{{ $ ghci GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci λ> :i (->) data (->) (a :: TYPE q) (b :: TYPE r) -- Defined in ‘GHC.Prim’ infixr 0 `(->)` <instances elided> }}} Notice that it prints: {{{ `(->)` }}} Which is totally wrong. This should simply be `->`. Patch incoming. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15236> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15236: GHCi pretty-prints (->)'s fixity poorly -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4799 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D4799 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15236#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15236: GHCi pretty-prints (->)'s fixity poorly -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4799 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"3397396a385ef9f493cf1e20894e88d21dfec48d/ghc" 3397396/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="3397396a385ef9f493cf1e20894e88d21dfec48d" Fix #15236 by removing parentheses from funTyConName Currently, `funTyConName` is defined as: ```lang=haskell funTyConName = mkPrimTyConName (fsLit "(->)") funTyConKey funTyCon ``` What's strange about this definition is that there are extraneous parentheses around `->`, which is quite unlike every other infix `Name`. As a result, the `:info (->)` output is totally garbled (see Trac #15236). It's quite straightforward to fix that particular bug by removing the extraneous parentheses. However, it turns out that this makes some test output involving `Show` instances for `TypeRep` look less appealing, since `->` is no longer surrounded with parentheses when applied prefix. But neither were any /other/ infix type constructors! The right fix there was to change `showTypeable` to put parentheses around prefix applications of infix tycons. Test Plan: ./validate Reviewers: bgamari, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15236 Differential Revision: https://phabricator.haskell.org/D4799 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15236#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15236: GHCi pretty-prints (->)'s fixity poorly -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4799 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15236#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC