[commit: ghc] wip/T12144: Implement deriving strategies (1f10e18)
git at git.haskell.org
git at git.haskell.org
Tue Sep 27 19:15:47 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T12144
Link : http://ghc.haskell.org/trac/ghc/changeset/1f10e1828d76894b0cc963aaf8df6fd5d6474fc9/ghc
>---------------------------------------------------------------
commit 1f10e1828d76894b0cc963aaf8df6fd5d6474fc9
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Sat Aug 27 14:00:04 2016 -0400
Implement deriving strategies
Summary:
Allows users to explicitly request which approach to `deriving` to use via
keywords, e.g.,
```
newtype Foo = Foo Bar
deriving Eq
deriving builtin Ord
deriving newtype Show
```
Fixes #10598.
Test Plan: ./validate
Reviewers: hvr, kosmikus, goldfire, bgamari, simonpj, alanz, austin, erikd, simonmar
Reviewed By: simonpj, alanz
Subscribers: thomie, mpickering, oerjan
Differential Revision: https://phabricator.haskell.org/D2280
GHC Trac Issues: #10598
>---------------------------------------------------------------
1f10e1828d76894b0cc963aaf8df6fd5d6474fc9
compiler/basicTypes/BasicTypes.hs | 26 +
compiler/deSugar/DsMeta.hs | 57 ++-
compiler/hsSyn/Convert.hs | 27 +-
compiler/hsSyn/HsDecls.hs | 89 ++--
compiler/main/DynFlags.hs | 1 +
compiler/main/HscStats.hs | 8 +-
compiler/parser/ApiAnnotation.hs | 4 +-
compiler/parser/Lexer.x | 8 +
compiler/parser/Parser.y | 124 +++--
compiler/prelude/THNames.hs | 151 +++---
compiler/rename/RnSource.hs | 45 +-
compiler/rename/RnTypes.hs | 4 +-
compiler/typecheck/TcDeriv.hs | 525 +++++++++++++++------
compiler/typecheck/TcGenDeriv.hs | 21 +-
compiler/typecheck/TcInstDcls.hs | 10 +-
docs/users_guide/8.2.1-notes.rst | 4 +
docs/users_guide/glasgow_exts.rst | 56 +++
.../ghc-boot-th/GHC/LanguageExtensions/Type.hs | 1 +
libraries/ghci/GHCi/TH/Binary.hs | 2 +
libraries/template-haskell/Language/Haskell/TH.hs | 13 +-
.../template-haskell/Language/Haskell/TH/Lib.hs | 32 +-
.../template-haskell/Language/Haskell/TH/Ppr.hs | 29 +-
.../template-haskell/Language/Haskell/TH/Syntax.hs | 40 +-
libraries/template-haskell/changelog.md | 3 +
testsuite/driver/extra_files.py | 1 +
.../tests/deriving/should_fail/T10598_fail1.hs | 11 +
.../tests/deriving/should_fail/T10598_fail1.stderr | 18 +
.../tests/deriving/should_fail/T10598_fail2.hs | 5 +
.../tests/deriving/should_fail/T10598_fail2.stderr | 12 +
.../tests/deriving/should_fail/T10598_fail3.hs | 8 +
.../tests/deriving/should_fail/T10598_fail3.stderr | 5 +
.../tests/deriving/should_fail/T10598_fail4.hs | 4 +
.../tests/deriving/should_fail/T10598_fail4.stderr | 4 +
.../tests/deriving/should_fail/T10598_fail5.hs | 5 +
.../tests/deriving/should_fail/T10598_fail5.stderr | 4 +
.../tests/deriving/should_fail/T10598_fail6.hs | 5 +
.../tests/deriving/should_fail/T10598_fail6.stderr | 6 +
testsuite/tests/deriving/should_fail/all.T | 6 +
testsuite/tests/deriving/should_run/T10598_bug.hs | 9 +
.../tests/deriving/should_run/T10598_bug.stdout | 1 +
testsuite/tests/deriving/should_run/T10598_run.hs | 24 +
.../tests/deriving/should_run/T10598_run.stdout | 2 +
testsuite/tests/deriving/should_run/all.T | 2 +
testsuite/tests/driver/T4437.hs | 3 +-
testsuite/tests/ghc-api/annotations/Makefile | 4 +
testsuite/tests/ghc-api/annotations/T10598.stdout | 36 ++
testsuite/tests/ghc-api/annotations/Test10598.hs | 18 +
testsuite/tests/ghc-api/annotations/all.T | 1 +
testsuite/tests/rts/T7919A.hs | 2 +-
testsuite/tests/th/T10598_TH.hs | 42 ++
testsuite/tests/th/T10598_TH.stderr | 41 ++
testsuite/tests/th/T10697_sourceUtil.hs | 2 +-
testsuite/tests/th/T10819.hs | 3 +-
testsuite/tests/th/T8100.hs | 4 +-
testsuite/tests/th/TH_dataD1.hs | 2 +-
testsuite/tests/th/all.T | 1 +
utils/mkUserGuidePart/Options/Language.hs | 7 +
57 files changed, 1203 insertions(+), 375 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 1f10e1828d76894b0cc963aaf8df6fd5d6474fc9
More information about the ghc-commits
mailing list