[commit: ghc] master: Implement deriving strategies (9e86276)

git at git.haskell.org git at git.haskell.org
Sat Oct 1 04:24:22 UTC 2016


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

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

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

commit 9e862765ffe161da8a4fd9cd67b0a600874feaa9
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Fri Sep 30 20:15:25 2016 -0400

    Implement deriving strategies
    
    Allows users to explicitly request which approach to `deriving` to use
    via keywords, e.g.,
    
    ```
    newtype Foo = Foo Bar
      deriving Eq
      deriving stock    Ord
      deriving newtype Show
    ```
    
    Fixes #10598. Updates haddock submodule.
    
    Test Plan: ./validate
    
    Reviewers: hvr, kosmikus, goldfire, alanz, bgamari, simonpj, austin,
    erikd, simonmar
    
    Reviewed By: alanz, bgamari, simonpj
    
    Subscribers: thomie, mpickering, oerjan
    
    Differential Revision: https://phabricator.haskell.org/D2280
    
    GHC Trac Issues: #10598


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

9e862765ffe161da8a4fd9cd67b0a600874feaa9
 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                            |   4 +
 compiler/parser/Parser.y                           | 126 +++--
 compiler/prelude/THNames.hs                        | 151 +++---
 compiler/rename/RnSource.hs                        |  45 +-
 compiler/rename/RnTypes.hs                         |   4 +-
 compiler/typecheck/TcDeriv.hs                      | 554 +++++++++++++++------
 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                  |  62 ++-
 docs/users_guide/safe_haskell.rst                  |   7 +-
 .../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 |  17 +
 .../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/T3833.stderr  |   2 +-
 testsuite/tests/deriving/should_fail/T3834.stderr  |   2 +-
 testsuite/tests/deriving/should_fail/T9600.stderr  |   2 +-
 testsuite/tests/deriving/should_fail/T9968a.stderr |   2 +-
 testsuite/tests/deriving/should_fail/all.T         |   6 +
 .../tests/deriving/should_fail/drvfail008.stderr   |   2 +-
 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/generics/T5462No1.stderr           |   6 +-
 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/module/mod53.stderr                |   2 +-
 .../tests/parser/should_fail/readFail039.stderr    |   2 +-
 testsuite/tests/rts/T7919A.hs                      |   2 +-
 testsuite/tests/safeHaskell/ghci/p16.stderr        |   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/haddock                                      |   2 +-
 utils/mkUserGuidePart/Options/Language.hs          |   7 +
 68 files changed, 1236 insertions(+), 405 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 9e862765ffe161da8a4fd9cd67b0a600874feaa9


More information about the ghc-commits mailing list