[GHC] #15572: TH improperly converts promoted data cons in ConT
GHC
ghc-devs at haskell.org
Tue Aug 28 20:00:15 UTC 2018
#15572: TH improperly converts promoted data cons in ConT
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.6.1
Component: Template Haskell | Version: 8.4.3
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:D5112
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Krzysztof Gogolewski <krz.gogolewski@…>):
In [changeset:"c46a5f2002f6694ea58f79f505d57f3b7bd450e7/ghc"
c46a5f20/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="c46a5f2002f6694ea58f79f505d57f3b7bd450e7"
Fix #15572 by checking for promoted names in ConT
Summary:
When converting `ConT`s to `HsTyVar`s in `Convert`, we were
failing to account for the possibility of promoted data constructor
names appearing in a `ConT`, which could result in improper
pretty-printing results (as observed in #15572). The fix is
straightforward: use `Promoted` instead of `NotPromoted` when the
name of a `ConT` is a data constructor name.
Test Plan: make test TEST=T15572
Reviewers: goldfire, bgamari, simonpj, monoidal
Reviewed By: goldfire, simonpj
Subscribers: monoidal, rwbarton, carter
GHC Trac Issues: #15572
Differential Revision: https://phabricator.haskell.org/D5112
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15572#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list