Fix #15572 by checking for promoted names in ConT

Authored by RyanGlScott on Aug 28 2018, 1:54 PM.


Fix Trac #15572 by checking for promoted names in ConT

When converting ConTs to HsTyVars 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 Trac #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: Trac #15572

Differential Revision:

(cherry picked from commit c46a5f2002f6694ea58f79f505d57f3b7bd450e7)