[commit: ghc] master: Add "quantified constraint" context in error message, fix #15231. (91822e4)

git at git.haskell.org git at git.haskell.org
Fri Jun 15 18:58:49 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/91822e4eee295a42f69489c7e9e878b296e897bc/ghc

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

commit 91822e4eee295a42f69489c7e9e878b296e897bc
Author: HE, Tao <sighingnow at gmail.com>
Date:   Fri Jun 15 13:45:42 2018 -0400

    Add "quantified constraint" context in error message, fix #15231.
    
    This patch adds "quantified constraint" context in error message when
    UndecidableInstances checking fails for quantified constraints.
    See Trac #15231:comment#1.
    
    This patch also pretty-prints the instance head for better error messages.
    
    Test Plan: make test TEST="T15231"
    
    Reviewers: bgamari, simonpj
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, rwbarton, thomie, carter
    
    GHC Trac Issues: #15231
    
    Differential Revision: https://phabricator.haskell.org/D4819


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

91822e4eee295a42f69489c7e9e878b296e897bc
 compiler/typecheck/TcValidity.hs                   | 30 ++++++++++++----------
 .../tests/deriving/should_fail/T8165_fail2.stderr  |  2 +-
 .../should_fail/NotRelaxedExamples.stderr          |  4 +--
 .../tests/indexed-types/should_fail/T10817.stderr  |  2 +-
 .../indexed-types/should_fail/TyFamUndec.stderr    |  5 ++--
 testsuite/tests/quantified-constraints/T15231.hs   | 15 +++++++++++
 .../tests/quantified-constraints/T15231.stderr     |  7 +++++
 testsuite/tests/quantified-constraints/all.T       |  1 +
 .../tests/typecheck/should_fail/fd-loop.stderr     |  4 +--
 .../tests/typecheck/should_fail/tcfail108.stderr   |  3 ++-
 .../tests/typecheck/should_fail/tcfail154.stderr   |  2 +-
 .../tests/typecheck/should_fail/tcfail157.stderr   |  6 +++--
 12 files changed, 56 insertions(+), 25 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 91822e4eee295a42f69489c7e9e878b296e897bc


More information about the ghc-commits mailing list