Marcin 'Qrczak' Kowalczyk wrote:
> GHC gives a false warning about overlapping patterns (-Wall):
> 
> f "ab"    = 1
> f ('c':_) = 2
> 
> Surprisingly, changing "ab" to ['a','b'] shuts up the warning.
> [...]

This is one of GHC's classic false alarms, and has been reported
a couple of times by different people (including me :-}. But IIRC
it can't be fixed easily, because of the way literals are handled
in the desugarer(?). You see similar effects with numeric literals
when GHC compiles itself and its libraries (e.g. modules Complex,
Int, Num, IIRC). I'd like to see these warnings disappear, too.
Hmmm, perhaps I should update my (slightly dormant) Wish List...
>:-)

Cheers,
   Sven
-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.informatik.uni-muenchen.de/~Sven.Panne

Reply via email to