[commit: ghc] wip/hasfield: Implement OverloadedRecordFields and modify OverloadedLabels (0bf2da8)
git at git.haskell.org
git at git.haskell.org
Tue Nov 15 08:32:58 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/hasfield
Link : http://ghc.haskell.org/trac/ghc/changeset/0bf2da87c75e4fb61566a035a121196de57f15c4/ghc
>---------------------------------------------------------------
commit 0bf2da87c75e4fb61566a035a121196de57f15c4
Author: Adam Gundry <adam at well-typed.com>
Date: Mon Nov 14 21:11:57 2016 +0000
Implement OverloadedRecordFields and modify OverloadedLabels
Summary:
This implements a new OverloadedRecordFields extension and modifies
the existing OverloadedLabels extension, as described in the GHC proposal:
https://github.com/ghc-proposals/ghc-proposals/pull/6
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: bgamari, simonpj, austin, hvr, goldfire
Subscribers: thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2708
>---------------------------------------------------------------
0bf2da87c75e4fb61566a035a121196de57f15c4
compiler/basicTypes/DataCon.hs | 15 ++-
compiler/deSugar/Coverage.hs | 2 +-
compiler/deSugar/DsBinds.hs | 3 +
compiler/deSugar/DsExpr.hs | 2 +-
compiler/deSugar/DsMeta.hs | 2 +-
compiler/deSugar/Match.hs | 2 +-
compiler/hsSyn/HsExpr.hs | 8 +-
compiler/main/DynFlags.hs | 1 +
compiler/parser/Lexer.x | 3 +-
compiler/parser/Parser.y | 2 +-
compiler/prelude/PrelNames.hs | 16 +++
compiler/rename/RnExpr.hs | 8 +-
compiler/typecheck/TcEvidence.hs | 6 +
compiler/typecheck/TcExpr.hs | 80 ++++++++----
compiler/typecheck/TcHsSyn.hs | 8 +-
compiler/typecheck/TcInteract.hs | 135 ++++++++++++++++++++-
compiler/typecheck/TcRnTypes.hs | 2 +-
compiler/typecheck/TcSMonad.hs | 12 +-
compiler/typecheck/TcValidity.hs | 44 +++++++
compiler/types/TyCon.hs | 5 +-
compiler/utils/FastStringEnv.hs | 5 +-
libraries/base/GHC/OverloadedLabels.hs | 41 +++++--
libraries/base/GHC/Records.hs | 55 +++++++++
libraries/base/base.cabal | 1 +
.../ghc-boot-th/GHC/LanguageExtensions/Type.hs | 1 +
testsuite/driver/extra_files.py | 1 +
testsuite/tests/driver/T4437.hs | 3 +-
testsuite/tests/overloadedrecflds/ghci/all.T | 1 +
...ghci01.script => duplicaterecfldsghci01.script} | 0
...ghci01.stdout => duplicaterecfldsghci01.stdout} | 0
.../ghci/overloadedlabelsghci01.script | 7 +-
.../ghci/overloadedrecfldsghci01.script | 25 ++--
.../ghci/overloadedrecfldsghci01.stdout | 29 +----
.../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 | 14 +++
.../should_fail/hasfieldfail03.hs | 39 ++++++
.../should_fail/hasfieldfail03.stderr | 21 ++++
.../should_fail/overloadedlabelsfail01.hs | 5 +-
.../should_fail/overloadedlabelsfail01.stderr | 29 ++---
.../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 | 34 ++++++
.../should_run/hasfieldrun01.stdout | 5 +
.../overloadedrecflds/should_run/hasfieldrun02.hs | 12 ++
...dedrecfldsrun06.stdout => hasfieldrun02.stdout} | 0
.../should_run/overloadedlabelsrun01.hs | 4 +-
.../should_run/overloadedlabelsrun02.hs | 4 +-
.../should_run/overloadedlabelsrun03.hs | 2 +-
.../should_run/overloadedrecfldsrun07.hs | 42 +++++++
.../should_run/overloadedrecfldsrun07.stdout | 3 +
60 files changed, 709 insertions(+), 129 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 0bf2da87c75e4fb61566a035a121196de57f15c4
More information about the ghc-commits
mailing list