[commit: ghc] master: Implement HasField constraint solving and modify OverloadedLabels (da49389)
git at git.haskell.org
git at git.haskell.org
Tue Feb 14 15:54:43 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/da493897ac6ee2b17a0c58b51315f9d136de730d/ghc
>---------------------------------------------------------------
commit da493897ac6ee2b17a0c58b51315f9d136de730d
Author: Adam Gundry <adam at well-typed.com>
Date: Tue Feb 14 09:53:28 2017 -0500
Implement HasField constraint solving and modify OverloadedLabels
This implements automatic constraint solving for the new HasField class
and modifies the existing OverloadedLabels extension, as described in
the GHC proposal
(https://github.com/ghc-proposals/ghc-proposals/pull/6). Per the current
form of the proposal, it does *not* currently introduce a separate
`OverloadedRecordFields` extension.
This replaces D1687.
The users guide documentation still needs to be written, but I'll do
that after the implementation is merged, in case there are further
design changes.
Test Plan: new and modified tests in overloadedrecflds
Reviewers: simonpj, goldfire, dfeuer, bgamari, austin, hvr
Reviewed By: bgamari
Subscribers: maninalift, dfeuer, ysangkok, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2708
>---------------------------------------------------------------
da493897ac6ee2b17a0c58b51315f9d136de730d
compiler/basicTypes/DataCon.hs | 14 ++-
compiler/basicTypes/RdrName.hs | 32 ++++--
compiler/deSugar/Coverage.hs | 2 +-
compiler/deSugar/DsBinds.hs | 4 +
compiler/deSugar/DsExpr.hs | 2 +-
compiler/deSugar/DsMeta.hs | 2 +-
compiler/deSugar/Match.hs | 2 +-
compiler/hsSyn/HsExpr.hs | 10 +-
compiler/parser/Parser.y | 2 +-
compiler/prelude/PrelNames.hs | 16 +++
compiler/rename/RnExpr.hs | 8 +-
compiler/rename/RnPat.hs | 23 ++--
compiler/typecheck/TcEvidence.hs | 7 ++
compiler/typecheck/TcExpr.hs | 58 ++++++----
compiler/typecheck/TcHsSyn.hs | 8 +-
compiler/typecheck/TcInteract.hs | 127 ++++++++++++++++++++-
compiler/typecheck/TcRnTypes.hs | 2 +-
compiler/typecheck/TcSMonad.hs | 21 +++-
compiler/typecheck/TcValidity.hs | 44 +++++++
compiler/types/TyCon.hs | 5 +-
compiler/utils/FastStringEnv.hs | 5 +-
libraries/base/GHC/OverloadedLabels.hs | 38 +++---
libraries/base/GHC/Records.hs | 34 ++++++
libraries/base/base.cabal | 1 +
testsuite/driver/extra_files.py | 1 +
testsuite/tests/overloadedrecflds/ghci/all.T | 2 +-
...ghci01.script => duplicaterecfldsghci01.script} | 0
...ghci01.stdout => duplicaterecfldsghci01.stdout} | 0
.../ghci/overloadedlabelsghci01.script | 7 +-
.../should_fail/HasFieldFail01_A.hs | 3 +
.../tests/overloadedrecflds/should_fail/all.T | 7 ++
.../should_fail/hasfieldfail01.hs | 9 ++
.../should_fail/hasfieldfail01.stderr | 11 ++
.../should_fail/hasfieldfail02.hs | 16 +++
.../should_fail/hasfieldfail02.stderr | 13 +++
.../should_fail/hasfieldfail03.hs | 39 +++++++
.../should_fail/hasfieldfail03.stderr | 21 ++++
.../should_fail/overloadedlabelsfail01.hs | 5 +-
.../should_fail/overloadedlabelsfail01.stderr | 21 +---
.../should_fail/overloadedlabelsfail02.hs | 3 +
.../should_fail/overloadedlabelsfail02.stderr | 2 +
.../should_fail/overloadedlabelsfail03.hs | 5 +
.../should_fail/overloadedlabelsfail03.stderr | 10 ++
.../should_run/OverloadedLabelsRun04_A.hs | 2 +-
.../tests/overloadedrecflds/should_run/T12243.hs | 25 ++++
.../overloadedrecflds/should_run/T12243.stdout | 2 +
testsuite/tests/overloadedrecflds/should_run/all.T | 4 +
.../overloadedrecflds/should_run/hasfieldrun01.hs | 51 +++++++++
.../should_run/hasfieldrun01.stdout | 8 ++
.../overloadedrecflds/should_run/hasfieldrun02.hs | 16 +++
...dedrecfldsrun06.stdout => hasfieldrun02.stdout} | 0
.../should_run/overloadedlabelsrun01.hs | 4 +-
.../should_run/overloadedlabelsrun02.hs | 4 +-
.../should_run/overloadedlabelsrun03.hs | 2 +-
.../should_run/overloadedrecfldsrun07.hs | 45 ++++++++
.../should_run/overloadedrecfldsrun07.stdout | 3 +
56 files changed, 699 insertions(+), 109 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 da493897ac6ee2b17a0c58b51315f9d136de730d
More information about the ghc-commits
mailing list