#15738: -ddump-splices omits required parentheses around quantified constraints -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.8.1 Component: Template Haskell | Version: 8.6.1 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:D5222 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"02b2116e458357e87718e7378a80579a7021e2a7/ghc" 02b2116/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="02b2116e458357e87718e7378a80579a7021e2a7" Fix #15738 by defining (and using) parenthesizeHsContext With `QuantifiedConstraints`, `forall`s can appear in more nested positions than they could before, but `Convert` and the TH pretty-printer were failing to take this into account. On the `Convert` side, this is fixed by using a `parenthesizeHsContext` to parenthesize singleton quantified constraints that appear to the left of a `=>`. (A similar fix is applied to the TH pretty-printer.) Test Plan: make test TEST=T15738 Reviewers: goldfire, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15738 Differential Revision: https://phabricator.haskell.org/D5222 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15738#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler