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
Showing
- compiler/main/DynFlags.hs 1 addition, 0 deletionscompiler/main/DynFlags.hs
- compiler/main/ErrUtils.hs 5 additions, 1 deletioncompiler/main/ErrUtils.hs
- compiler/typecheck/TcDerivUtils.hs 10 additions, 5 deletionscompiler/typecheck/TcDerivUtils.hs
- compiler/typecheck/TcGenDeriv.hs 35 additions, 26 deletionscompiler/typecheck/TcGenDeriv.hs
- docs/users_guide/8.4.1-notes.rst 111 additions, 23 deletionsdocs/users_guide/8.4.1-notes.rst
- docs/users_guide/glasgow_exts.rst 52 additions, 0 deletionsdocs/users_guide/glasgow_exts.rst
- libraries/base/Data/Void.hs 12 additions, 21 deletionslibraries/base/Data/Void.hs
- libraries/base/GHC/Generics.hs 9 additions, 6 deletionslibraries/base/GHC/Generics.hs
- libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs 1 addition, 0 deletionslibraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
- testsuite/tests/deriving/should_compile/drv-empty-data.stderr 241 additions, 9 deletions...suite/tests/deriving/should_compile/drv-empty-data.stderr
- testsuite/tests/deriving/should_fail/T7401_fail.hs 3 additions, 0 deletionstestsuite/tests/deriving/should_fail/T7401_fail.hs
- testsuite/tests/deriving/should_fail/T7401_fail.stderr 6 additions, 0 deletionstestsuite/tests/deriving/should_fail/T7401_fail.stderr
- testsuite/tests/deriving/should_fail/all.T 1 addition, 0 deletionstestsuite/tests/deriving/should_fail/all.T
- testsuite/tests/deriving/should_run/T5628.stderr 0 additions, 3 deletionstestsuite/tests/deriving/should_run/T5628.stderr
- testsuite/tests/deriving/should_run/T5628.stdout 1 addition, 0 deletionstestsuite/tests/deriving/should_run/T5628.stdout
- testsuite/tests/deriving/should_run/T7401.hs 20 additions, 0 deletionstestsuite/tests/deriving/should_run/T7401.hs
- testsuite/tests/deriving/should_run/T7401.stdout 2 additions, 0 deletionstestsuite/tests/deriving/should_run/T7401.stdout
- testsuite/tests/deriving/should_run/all.T 2 additions, 1 deletiontestsuite/tests/deriving/should_run/all.T
- testsuite/tests/driver/T4437.hs 2 additions, 1 deletiontestsuite/tests/driver/T4437.hs
Loading
Please register or sign in to comment