Non-exhaultive patterns from derived Read
When switching from GHC 5.04.1 to 6.0 I started getting
a load of warnings like these:
source/SDL/Types.hs:33:
Warning: Pattern match(es) are non-exhaustive
In a pattern binding in
a 'do' expression:
Patterns not matched:
Text.Read.Lex.EOF
Text.Read.Lex.Rat _
Text.Read.Lex.Int _
Text.Read.Lex.Symbol _
...
The source in question looks like this
data Expected
= ExpectedType String
| ExpectedValue String
deriving (Read, Show)
It looks as though everything deriving Read causes this
warning (there are several such constructs in the file).
Deriving only Show does not. Found no mention of
change to behavior of derived reads in release notes or in
google.
Cheers,
Jason Feingold
jfeingol@haverford.edu
Trac metadata
Trac field |
Value |
Version |
None |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedWon'tFix |
Component |
Compiler |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|