[commit: ghc] master: Improve error message for newtypes and deriving clauses (4f80ec0)

git at git.haskell.org git at git.haskell.org
Thu Jul 30 15:04:51 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/4f80ec0ee438800d95673a4898e69371957fed09/ghc

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

commit 4f80ec0ee438800d95673a4898e69371957fed09
Author: John Wiegley <johnw at newartisans.com>
Date:   Thu Jul 30 15:08:28 2015 +0200

    Improve error message for newtypes and deriving clauses
    
    Summary:
    Change the error message generated when a deriving clause related to a newtype
    fails to always suggested trying GeneralizedNewtypeDeriving, even in
    situations where it may not work. Fixes #9600.
    
    Test Plan: testsuite/deriving/should_fail/9600.hs
    
    Reviewers: austin, bgamari, simonpj
    
    Rebased-by: bgamari
    
    Reviewed By: simonpj
    
    Subscribers: bgamari, hvr, simonmar, carter
    
    Differential Revision: https://phabricator.haskell.org/D216
    
    GHC Trac Issues: #9600


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

4f80ec0ee438800d95673a4898e69371957fed09
 compiler/typecheck/TcDeriv.hs                      | 24 ++++++++++++++--------
 testsuite/tests/deriving/should_fail/T2721.stderr  |  4 ++--
 testsuite/tests/deriving/should_fail/T3833.stderr  |  4 ++--
 testsuite/tests/deriving/should_fail/T3834.stderr  |  4 ++--
 testsuite/tests/deriving/should_fail/T9600-1.hs    |  5 +++++
 .../tests/deriving/should_fail/T9600-1.stderr      |  6 ++++++
 testsuite/tests/deriving/should_fail/T9600.hs      |  3 +++
 testsuite/tests/deriving/should_fail/T9600.stderr  |  6 ++++++
 testsuite/tests/deriving/should_fail/all.T         |  2 ++
 .../tests/deriving/should_fail/drvfail009.stderr   | 12 +++++------
 testsuite/tests/generics/T5462No1.stderr           | 12 +++++------
 testsuite/tests/module/mod53.stderr                |  4 ++--
 .../tests/parser/should_fail/readFail039.stderr    |  4 ++--
 testsuite/tests/safeHaskell/ghci/p16.stderr        |  2 +-
 14 files changed, 61 insertions(+), 31 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 4f80ec0ee438800d95673a4898e69371957fed09


More information about the ghc-commits mailing list