Thanks, this is a known shortcoming. We'll either fix the docs or the
implementation!

--Sigbjorn

Sven Panne writes:
> 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...   :-(
> 

Reply via email to