#7336: Defined but not used is not detected for data types with instances
------------------------------+---------------------------------------------
 Reporter:  maeder            |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.6.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 {{{
 module Unused () where

 data U = U deriving Show
 }}}

 does _not_ report

 {{{
 Unused.hs:3:6: Warning:
     Defined but not used: type constructor or class `U'

 Unused.hs:3:10: Warning: Defined but not used: data constructor `U'
 }}}

 This message is only displayed without "deriving".
 I know, instances are always exported, but these instances cannot be used.

 Considering that all types may get Typeable instances, no unused warning
 would ever be issued for data types.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7336>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to