#13919: Incorrect unused top binding warning when interacting with GHC.Generics -------------------------------------+------------------------------------- Reporter: Taneb | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Generics Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple error/warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: #1954 | Differential Rev(s): Phab:D3704 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"15fcd9adb75b95b32fbe08d066a2ada5f298d667/ghc" 15fcd9ad/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="15fcd9adb75b95b32fbe08d066a2ada5f298d667" Suppress unused warnings for selectors for some derived classes Although derived `Read`, `Show`, and `Generic` instances technically don't //use// the record selectors of the data type for which an instance is being derived, the derived code is affected by the //presence// of record selectors. As a result, we should suppress `-Wunused-binds` for those record selectors when deriving these classes. This is accomplished by threading through more information from `hasStockDeriving`. Test Plan: make test TEST=T13919 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13919 Differential Revision: https://phabricator.haskell.org/D3704 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13919#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler