Just some puzzling warnings from 4.00 (Oct 18th snapshot):
----------------------------------------------------------------
module Foo(f,g,Bar(..)) where
import Complex
data Bar = Bar Int
instance Show Bar where showsPrec _ _ = iAmUsed
iAmUsed :: ShowS
iAmUsed = showString "funny..."
f :: RealFloat a => Complex a -> Int
f 0 = 42
f _ = 31415
g :: RealFloat a => Complex a -> Int
g 0 = 42
g (_ :+ _) = 31415
----------------------------------------------------------------
panne:~ > ghc -Wall -c Foo.hs
Foo.hs:8: Warning: `iAmUsed' is bound but not used
Foo.hs:15:
Pattern match(es) are overlapped in the definition of function `g'
(:+ _ _) = ...
Foo.hs:15:
Pattern match(es) are non-exhaustive
in the definition of function `g'
Patterns not recognized: #x with #x `not_elem` [0]
ghc: module version changed to 1; reason: no old .hi file
----------------------------------------------------------------
NB: There are no warnings for f...
--
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.pms.informatik.uni-muenchen.de/mitarbeiter/panne