GHC-3.01 can generate some really useful warnings, but some of those
generated by -fwarn-unused-binds (which is switched on via -Wall, too)
are plainly wrong. Silly, but short example:

-- Foo.hs ----------------------
module Foo(Bar(..)) where

data Bar = MkBar

instance Show Bar where
   showsPrec _ = baz

baz :: Bar -> ShowS
baz MkBar = showString "MkBar"
-------------------------------

   panne@liesl:> ghc -fwarn-unused-binds -c Foo.hs
 
   Foo.hs:9: Warning: `baz' is bound but not used

   ghc: module version changed to 1; reason: no old .hi file

GHC doesn't seem to take instance declarations into account when
complaining...   :-(

-- 
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

Reply via email to