You need to sign in or sign up before continuing.
OverloadedLists breaks exhaustiveness check
{-# LANGUAGE OverloadedLists #-}
module Bug where
f :: [a] -> ()
f x = case x of
[] -> ()
(_:_) -> ()
GHC reports:
bug.hs:6:7: Warning:
Pattern match(es) are non-exhaustive
In a case alternative: Patterns not matched: []
This is reproducible with 7.8 and 7.10rc1.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.8.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |