[commit: ghc] master: Disambiguate record selectors by type signature (0a16374)

git at git.haskell.org git at git.haskell.org
Fri Oct 30 14:15:26 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0a16374109ad16d9337185f5c0a845a3f20141cb/ghc

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

commit 0a16374109ad16d9337185f5c0a845a3f20141cb
Author: Adam Gundry <adam at well-typed.com>
Date:   Fri Oct 30 14:14:21 2015 +0000

    Disambiguate record selectors by type signature
    
    This makes DuplicateRecordFields more liberal in when it will
    accept ambiguous record selectors, making use of type information in a
    similar way to updates. See Note [Disambiguating record fields] for more
    details. I've also refactored how record updates are disambiguated.
    
    Test Plan: New and amended tests in overloadedrecflds
    
    Reviewers: simonpj, goldfire, bgamari, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1391


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

0a16374109ad16d9337185f5c0a845a3f20141cb
 compiler/deSugar/DsExpr.hs                         |   2 +-
 compiler/deSugar/DsMeta.hs                         |   6 +-
 compiler/hsSyn/HsExpr.hs                           |   8 +-
 compiler/hsSyn/HsPat.hs                            |   2 +
 compiler/hsSyn/HsTypes.hs                          |   5 +-
 compiler/rename/RnEnv.hs                           |   1 +
 compiler/rename/RnExpr.hs                          |  11 +-
 compiler/rename/RnPat.hs                           |   2 +-
 compiler/typecheck/TcExpr.hs                       | 314 ++++++++++++++-------
 .../tests/overloadedrecflds/should_fail/all.T      |   2 +
 .../should_fail/overloadedrecfldsfail01.stderr     |  14 +-
 .../should_fail/overloadedrecfldsfail04.hs         |   2 +
 .../should_fail/overloadedrecfldsfail09.stderr     |   2 +-
 .../should_fail/overloadedrecfldsfail12.hs         |   3 +
 .../should_fail/overloadedrecfldsfail12.stderr     |   4 +
 .../should_fail/overloadedrecfldsfail13.hs         |  20 ++
 .../should_fail/overloadedrecfldsfail13.stderr     |  22 ++
 .../should_fail/overloadedrecfldsfail14.hs         |  14 +
 .../should_fail/overloadedrecfldsfail14.stderr     |   5 +
 testsuite/tests/overloadedrecflds/should_run/all.T |   1 +
 .../should_run/overloadedrecfldsrun06.hs           |  21 ++
 .../should_run/overloadedrecfldsrun06.stdout       |   1 +
 22 files changed, 335 insertions(+), 127 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 0a16374109ad16d9337185f5c0a845a3f20141cb


More information about the ghc-commits mailing list