Record full FieldLabel in ifConFields.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 23 Feb 2017 04:32:41 +0000 (20:32 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Fri, 24 Feb 2017 22:52:42 +0000 (14:52 -0800)
commit9d17028fbcecb53480598c4fcc7bd9e71b2ac7cf
tree2e4f4f91b9f13c335896ca1dae6a29acd57bd0c7
parent93ffcb028630df97bda82f16a103e3c8ffdaba35
Record full FieldLabel in ifConFields.

Summary:
The previous implementation tried to be "efficient" by
storing field names once in IfaceConDecls, and only just
enough information for us to reconstruct the FieldLabel.
But this came at a bit of code complexity cost.

This patch undos the optimization, instead storing a full
FieldLabel at each data constructor.  Consequently, this fixes
bugs #12699 and #13250.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: adamgundry, bgamari, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3174
compiler/backpack/RnModIface.hs
compiler/iface/IfaceSyn.hs
compiler/iface/MkIface.hs
compiler/iface/TcIface.hs
testsuite/tests/backpack/should_compile/T13250.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/T13250.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/all.T