[GHC] #8542: Suggest NegativeLiterals

GHC ghc-devs at haskell.org
Mon Mar 12 18:32:11 UTC 2018


#8542: Suggest NegativeLiterals
-------------------------------------+-------------------------------------
        Reporter:  monoidal          |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.7
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  numeric/should_fail/T8542
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by monoidal):

 Originally, we were giving this warning both to `128 :: Word8` and `-128
 :: Word8`.

 In #13257 the code was modified to recognize the pattern `negate
 (fromIntegral x)`. I guess that HPC is modifying to code to be able to
 check for coverage of both the whole expression `negate (fromInteger x)`
 and the subexpression `fromInteger x`, and this causes the warning not to
 appear. Nothing to worry, I would just skip the test with this way.

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


More information about the ghc-tickets mailing list