Opened 5 years ago

Closed 4 years ago

Last modified 19 months ago

#10393 closed bug (duplicate)

Bogus warning with OverloadedLists

Reported by: goldfire Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.10.1
Keywords: PatternMatchWarnings Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Test Case:
Blocked By: Blocking:
Related Tickets: #9951 Differential Rev(s):
Wiki Page:


When I say

{-# LANGUAGE OverloadedLists #-}

lgo :: [a] -> ()
lgo [] = ()
lgo (_:_) = ()

I get

/Users/rae/temp/Bug.hs:4:1: Warning:
    Pattern match(es) are non-exhaustive
    In an equation for ‘lgo’: Patterns not matched: []

I don't know OverloadedLists deeply, but that warning surely is confusing!

Happens on both 7.8.3 and 7.10.1.

Change History (2)

comment:1 Changed 4 years ago by thomie

Resolution: duplicate
Status: newclosed

comment:2 Changed 19 months ago by simonpj

Keywords: PatternMatchWarnings added
Note: See TracTickets for help on using tickets.