
#15878: Unused data type with a "deriving" clause is falsely considered used -------------------------------------+------------------------------------- Reporter: EyalLotem | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Incorrect Unknown/Multiple | error/warning at compile-time Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- module M () where data Foo = Bar deriving (Eq) If there are no explicit references to Foo and none to Bar, the data-type is necessarily unused, so I expect a warning about an unused data-type. Even if it is referenced, but only from instance declarations, it is necessarily unused in the program. One potential exception is functional dependencies, where the instance declaration itself has an effect. But even then, perhaps it is worth warning that the *type* is unused. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15878 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler