#14817: GHC 8.4.1 pretty-prints data family instances with redundant kind signatures using -ddump-splices -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.4.1-alpha3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4418 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"aef2b429072e3d3bbdbcb9e4082a0d86ba329d9e/ghc" aef2b429/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="aef2b429072e3d3bbdbcb9e4082a0d86ba329d9e" Fix #14817 by not double-printing data family instance kind signatures Within `pprDataFamInstDecl`, we were invoking `pprFamInstLHS` to pretty-print a data family instance header, and we were passing `Just` a kind signature to `pprFamInstLHS` to make it pretty-print the kind signature alongside it (this is a consequence of commit d1ef223cfebd23c25489a4b0c67fbaa2f91c1ec6). But this is silly, because then invoke `pp_data_defn`, which //also// pretty-prints the kind signature, resulting in the kind signature being printed twice by mistake. This fix is simple—pass `Nothing` to `pprFamInstLHS` instead. Test Plan: make test TEST=T14817 Reviewers: alanz, bgamari, mpickering Reviewed By: mpickering Subscribers: mpickering, rwbarton, thomie, carter GHC Trac Issues: #14817 Differential Revision: https://phabricator.haskell.org/D4418 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14817#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler