#14692: Deriving Show with -XEmptyDataDeriving cases on the wrong argument -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Resolution: | Keywords: deriving Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4328 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"0074a08ea9dfd1416aa57a9504be73dcdf7a1e2b/ghc" 0074a08e/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="0074a08ea9dfd1416aa57a9504be73dcdf7a1e2b" Fix #14692 by correcting an off-by-one error in TcGenDeriv A silly mistake in `gen_Show_binds` was causing derived `Show` instances for empty data types to case on the precedence argument instead of the actual value being showed. Test Plan: make test TEST=drv-empty-data Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14692 Differential Revision: https://phabricator.haskell.org/D4328 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14692#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler