[GHC] #16031: Show instance for Data.Fixed does not show parentheses for negatives

GHC ghc-devs at haskell.org
Wed Jan 16 05:52:08 UTC 2019


#16031: Show instance for Data.Fixed does not show parentheses for negatives
-------------------------------------+-------------------------------------
        Reporter:  skeuchel          |                Owner:  supersven
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.8.1
       Component:  libraries/base    |              Version:  8.7
      Resolution:  fixed             |             Keywords:  Data.Fixed,
                                     |  Show, newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Incorrect result  |            Test Case:
  at runtime                         |  libraries/base/tests/data-fixed-
                                     |  show-read
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"01b60b0e1ee57f882c5b729854343916c2295c51/ghc" 01b60b0/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="01b60b0e1ee57f882c5b729854343916c2295c51"
 Fix precedence handling for Data.Fixed's Show instance (#16031)

 Use `showsPrec` instead of `show` to respect the precedence of the
 surrounding
 context.
 }}}

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


More information about the ghc-tickets mailing list