[GHC] #2530: deriving Show adds extra parens for constructor with record syntax

GHC ghc-devs at haskell.org
Sun Mar 6 09:27:48 UTC 2016


#2530: deriving Show adds extra parens for constructor with record syntax
-------------------------------------+-------------------------------------
        Reporter:  spl               |                Owner:  bgamari
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  6.8.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:D669
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by hvr):

 Replying to [comment:33 RyanGlScott]:
 > Well, if people find this objectionable, I suppose we also need to
 review #10104, since that also resulted in a change in `Show` output.

 There's a big difference though: #2530 wants to fix a deliberate deviation
 (i.e. many people here  consider `{}` binding tighter than function
 application to be a design-flaw) from the Haskell Report. Those additional
 brackets are harmless and don't harm the expectation of 'Show' resulting
 in an expression that parses back to the original.

 On the other hand, #10104 covers an area outside the Haskell Report
 (`-XMagicHash`) and more importantly fixes the actual problem that `show
 (MkT 3#)` results in `MkT 3` which can't be parsed back to the original
 due to a kind-error.

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


More information about the ghc-tickets mailing list