
#10930: missing empty-Enumeration and out-of-range warning for `Natural` -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: bug | Status: new Priority: low | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #7881, #10929 | Differential Rev(s): Phab:D1306 -------------------------------------+------------------------------------- Description changed by hvr: Old description: New description: {{{ GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help λ:2> :set -XNegativeLiterals λ:3> (-123) :: Word <interactive>:3:2: Warning: Literal -123 is out of the Word range 0..18446744073709551615 18446744073709551493 it :: Word λ:4> (-123) :: Numeric.Natural.Natural *** Exception: arithmetic underflow λ:5> λ:6> [10..3] :: [Word] <interactive>:6:1: Warning: Enumeration is empty [] it :: [Word] λ:7> [10..3] :: [Numeric.Natural.Natural] [] it :: [GHC.Natural.Natural] }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10930#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler