[commit: ghc] master: Report arity errors correctly despite kinds (5879d5a)

git at git.haskell.org git at git.haskell.org
Thu Jun 18 13:14:54 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5879d5aab929e9959d48e03dad456b824160b3bf/ghc

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

commit 5879d5aab929e9959d48e03dad456b824160b3bf
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jun 18 08:54:11 2015 +0100

    Report arity errors correctly despite kinds
    
    Trac #10516 pointed out that when reporting arity errors
    (like "T needs 2 arguments but has been given 1"), we should
    not count kind arguments, since they are implicit.  If we
    include kind args in the count, we get very confusing error
    messages indeed.
    
    I did a little bit of refactoring which make some
    error messages wobble around.  But the payload of
    this fix is in TcValidity.tyConArityErr


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

5879d5aab929e9959d48e03dad456b824160b3bf
 compiler/typecheck/TcPat.hs                        |  4 +-
 compiler/typecheck/TcTyClsDecls.hs                 |  9 +---
 compiler/typecheck/TcValidity.hs                   | 51 +++++++++++++---------
 compiler/types/TyCon.hs                            | 19 ++++++++
 testsuite/tests/gadt/T3163.stderr                  |  4 +-
 testsuite/tests/gadt/gadt11.stderr                 |  4 +-
 testsuite/tests/gadt/gadtSyntaxFail001.stderr      |  4 +-
 testsuite/tests/gadt/gadtSyntaxFail002.stderr      |  4 +-
 testsuite/tests/gadt/gadtSyntaxFail003.stderr      |  4 +-
 testsuite/tests/gadt/records-fail1.stderr          |  4 +-
 testsuite/tests/ghci/scripts/T9293.stderr          | 10 ++---
 testsuite/tests/ghci/scripts/ghci057.stderr        | 10 ++---
 .../tests/indexed-types/should_fail/BadSock.stderr |  4 +-
 .../tests/indexed-types/should_fail/T2157.stderr   |  4 +-
 .../tests/indexed-types/should_fail/T9433.stderr   |  4 +-
 testsuite/tests/module/mod60.stderr                |  4 +-
 .../should_fail/ParserNoBinaryLiterals2.stderr     |  4 +-
 .../should_fail/ParserNoBinaryLiterals3.stderr     |  4 +-
 testsuite/tests/polykinds/T10516.hs                |  9 ++++
 testsuite/tests/polykinds/T10516.stderr            |  4 ++
 testsuite/tests/polykinds/T9222.stderr             |  4 +-
 testsuite/tests/polykinds/all.T                    |  1 +
 .../tests/typecheck/should_compile/T7050.stderr    |  4 +-
 .../tests/typecheck/should_compile/T7562.stderr    |  4 +-
 testsuite/tests/typecheck/should_fail/T3966.stderr |  6 +--
 testsuite/tests/typecheck/should_fail/T7175.stderr |  4 +-
 .../tests/typecheck/should_fail/tcfail100.stderr   |  6 +--
 .../tests/typecheck/should_fail/tcfail101.stderr   |  4 +-
 .../tests/typecheck/should_fail/tcfail107.stderr   |  4 +-
 .../tests/typecheck/should_fail/tcfail129.stderr   |  8 ++--
 .../tests/typecheck/should_fail/tcfail140.stderr   | 12 ++---
 .../tests/typecheck/should_fail/tcfail155.stderr   |  4 +-
 .../tests/typecheck/should_fail/tcfail187.stderr   |  4 +-
 .../tests/typecheck/should_fail/tcfail195.stderr   |  4 +-
 .../tests/typecheck/should_fail/tcfail209.stderr   |  4 +-
 35 files changed, 137 insertions(+), 100 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 5879d5aab929e9959d48e03dad456b824160b3bf


More information about the ghc-commits mailing list