Opened 2 years ago

Closed 2 years ago

#10929 closed bug (fixed)

Enumeration-empty warning not firing for `[Integer]`

Reported by: hvr Owned by: hvr
Priority: low Milestone: 8.0.1
Component: Compiler Version: 7.10.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: numeric/should_compile/T10929.hs
Blocked By: Blocking:
Related Tickets: #7881 Differential Rev(s): Phab:D1305
Wiki Page:

Description

GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
λ:2> [10..4] :: [Integer]
[]
it :: [Integer]


λ:3> [10..4] :: [Int]
<interactive>:3:1: Warning: Enumeration is empty
[]
it :: [Int]


λ:4> [10..4] :: [Word]
<interactive>:4:1: Warning: Enumeration is empty
[]
it :: [Word]

(Trivial to fix, patch following shortly)

Change History (6)

comment:1 Changed 2 years ago by hvr

Owner: set to hvr

comment:2 Changed 2 years ago by hvr

comment:3 Changed 2 years ago by hvr

Differential Rev(s): Phab:D1305
Test Case: numeric/should_compile/T10929.hs

comment:4 Changed 2 years ago by hvr

Status: newpatch

comment:5 Changed 2 years ago by Ben Gamari <ben@…>

In 0eb8fcd9/ghc:

Enable `Enumeration is empty` warnings for `Integer`

This warning was implemented via
abb3a9faa88fad3562ac41a148dd683765f47565 for addressing #7881. The
bounded H2010 integral types were handled, but the `Integer` type was
missed for the enumeration warning.

Fixes #10929

Test Plan: reused T7881 testcase

Reviewers: thomie, bgamari, austin

Reviewed By: thomie, bgamari, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1305

GHC Trac Issues: #10929

comment:6 Changed 2 years ago by bgamari

Resolution: fixed
Status: patchclosed
Note: See TracTickets for help on using tickets.