[commit: ghc] master: Fix #10684 by processing deriving clauses with finer grain (6bb32ba)

git at git.haskell.org git at git.haskell.org
Tue Jul 25 20:17:35 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/6bb32ba78580271921e3d5c3c98afac2c1b68de4/ghc

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

commit 6bb32ba78580271921e3d5c3c98afac2c1b68de4
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Tue Jul 25 16:14:27 2017 -0400

    Fix #10684 by processing deriving clauses with finer grain
    
    Summary:
    Previously, one could experience error cascades with deriving clauses
    when one class in a set of many failed to derive, causing the other derived
    classes to be skipped entirely and resulting in other errors down the line.
    The solution is to process each class in a data type's set of deriving clauses
    individually, and engineer it so that failure to derive an individual class
    within that set doesn't cancel out the others.
    
    Test Plan: make test TEST="T10684 T12801"
    
    Reviewers: austin, bgamari, simonpj
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, rwbarton, thomie
    
    GHC Trac Issues: #10684, #12801
    
    Differential Revision: https://phabricator.haskell.org/D3771


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

6bb32ba78580271921e3d5c3c98afac2c1b68de4
 compiler/typecheck/TcDeriv.hs                      | 109 +++++++++++++++++----
 testsuite/tests/deriving/should_fail/T10684.hs     |   4 +
 testsuite/tests/deriving/should_fail/T10684.stderr |   5 +
 testsuite/tests/deriving/should_fail/T12801.hs     |   8 ++
 testsuite/tests/deriving/should_fail/T12801.stderr |   5 +
 testsuite/tests/deriving/should_fail/all.T         |   2 +
 6 files changed, 113 insertions(+), 20 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 6bb32ba78580271921e3d5c3c98afac2c1b68de4


More information about the ghc-commits mailing list