[commit: ghc] master: Implement the EmptyDataDeriving proposal (1317ba6)

git at git.haskell.org git at git.haskell.org
Thu Nov 2 17:30:52 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1317ba625d40fbd51cb0538b3fde28f412f30c01/ghc

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

commit 1317ba625d40fbd51cb0538b3fde28f412f30c01
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Thu Nov 2 11:52:50 2017 -0400

    Implement the EmptyDataDeriving proposal
    
    This implements the `EmptyDataDeriving` proposal put forth in
    https://github.com/ghc-proposals/ghc-proposals/blob/dbf51608/proposals/0006-deriving-empty.rst.
    This has two major changes:
    
    * The introduction of an `EmptyDataDeriving` extension, which
      permits directly deriving `Eq`, `Ord`, `Read`, and `Show` instances
      for empty data types.
    * An overhaul in the code that is emitted in derived instances for
      empty data types. To see an overview of the changes brought forth,
      refer to the changes to the 8.4.1 release notes.
    
    Test Plan: ./validate
    
    Reviewers: bgamari, dfeuer, austin, hvr, goldfire
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #7401, #10577, #13117
    
    Differential Revision: https://phabricator.haskell.org/D4047


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

1317ba625d40fbd51cb0538b3fde28f412f30c01
 compiler/main/DynFlags.hs                          |   1 +
 compiler/main/ErrUtils.hs                          |   6 +-
 compiler/typecheck/TcDerivUtils.hs                 |  15 +-
 compiler/typecheck/TcGenDeriv.hs                   |  61 ++---
 docs/users_guide/8.4.1-notes.rst                   | 134 +++++++++--
 docs/users_guide/glasgow_exts.rst                  |  52 +++++
 libraries/base/Data/Void.hs                        |  33 +--
 libraries/base/GHC/Generics.hs                     |  15 +-
 .../ghc-boot-th/GHC/LanguageExtensions/Type.hs     |   1 +
 .../deriving/should_compile/drv-empty-data.stderr  | 250 ++++++++++++++++++++-
 testsuite/tests/deriving/should_fail/T7401_fail.hs |   3 +
 .../tests/deriving/should_fail/T7401_fail.stderr   |   6 +
 testsuite/tests/deriving/should_fail/all.T         |   1 +
 testsuite/tests/deriving/should_run/T5628.stderr   |   3 -
 .../tests/deriving/should_run/T5628.stdout         |   0
 testsuite/tests/deriving/should_run/T7401.hs       |  20 ++
 .../tests/deriving/should_run/T7401.stdout         |   1 +
 testsuite/tests/deriving/should_run/all.T          |   3 +-
 testsuite/tests/driver/T4437.hs                    |   3 +-
 19 files changed, 512 insertions(+), 96 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 1317ba625d40fbd51cb0538b3fde28f412f30c01


More information about the ghc-commits mailing list