Fix #15572 by checking for promoted names in ConT
ClosedPublic

Authored by RyanGlScott on Aug 27 2018, 1:35 PM.

Details

Summary

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

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
RyanGlScott created this revision.Aug 27 2018, 1:35 PM
goldfire accepted this revision.Aug 27 2018, 9:41 PM

LGTM.

This revision is now accepted and ready to land.Aug 27 2018, 9:41 PM
simonpj accepted this revision.Aug 28 2018, 4:05 AM
monoidal requested changes to this revision.Aug 28 2018, 5:49 AM
monoidal added a subscriber: monoidal.

You need to commit T15572.stderr.

This revision now requires changes to proceed.Aug 28 2018, 5:49 AM
  • Check in test file

Oops! Good catch. I've checked it in now.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 28 2018, 3:00 PM
This revision was automatically updated to reflect the committed changes.