Fix Trac #3126: matching overloaded literals
authorsimonpj@microsoft.com <unknown>
Mon, 30 Mar 2009 08:34:35 +0000 (08:34 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 30 Mar 2009 08:34:35 +0000 (08:34 +0000)
commit4da93ad236882128b7b446e83a2c159ef17d7ffa
tree00928be2a72164a7954a210c02c169cdf0fa1fe9
parent5e2dc400691d3ce0fb59daa8783cea06faba9c97
Fix Trac #3126: matching overloaded literals

Claus Reinke uncovered a long-standing bug in GHC, whereby we were
combining the pattern-match on overloaded literals, missing the fact
that an intervening pattern (for a different literal) might also
match.  (If someone had a very odd implementation of fromInteger!)

See Note [Grouping overloaded literal patterns] in Match.lhs

If this merges smoothly to 6.10, go for it, but it's very much
a corner case.

Thank you Claus!
compiler/deSugar/Match.lhs
compiler/deSugar/MatchLit.lhs