[commit: ghc] master: Record full FieldLabel in ifConFields. (9d17028)

git at git.haskell.org git at git.haskell.org
Fri Feb 24 22:53:08 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9d17028fbcecb53480598c4fcc7bd9e71b2ac7cf/ghc

>---------------------------------------------------------------

commit 9d17028fbcecb53480598c4fcc7bd9e71b2ac7cf
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Wed Feb 22 20:32:41 2017 -0800

    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 at cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: adamgundry, bgamari, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D3174


>---------------------------------------------------------------

9d17028fbcecb53480598c4fcc7bd9e71b2ac7cf
 compiler/backpack/RnModIface.hs                    | 13 ++--
 compiler/iface/IfaceSyn.hs                         | 75 +++++++++-------------
 compiler/iface/MkIface.hs                          | 15 ++---
 compiler/iface/TcIface.hs                          | 24 ++-----
 testsuite/tests/backpack/should_compile/T13250.bkp |  8 +++
 .../should_compile/{bkp37.stderr => T13250.stderr} |  4 +-
 testsuite/tests/backpack/should_compile/all.T      |  1 +
 7 files changed, 58 insertions(+), 82 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 9d17028fbcecb53480598c4fcc7bd9e71b2ac7cf


More information about the ghc-commits mailing list