Improve type-error reporting
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 21 Sep 2017 16:39:18 +0000 (17:39 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 25 Sep 2017 13:01:15 +0000 (14:01 +0100)
commit1b476ab55be6c2c553988cc63d8e0c5473136275
tree3fcf1a41488ab6354dac819c280539046e763c25
parent3b4833a22596922d5e7a3f0037c960a5e230fb31
Improve type-error reporting

This patch does two things:

* When reporting a hole, we now include its kind if the
  kind is not just '*'.  This addresses Trac #14265

* When reporting things like "'a' is a rigid type varaible
  bound by ...", this patch arranges to group the type variables
  together, so we don't repeat the "bound by..." stuff endlessly
19 files changed:
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcRnTypes.hs
testsuite/tests/ghci/scripts/T10248.stderr
testsuite/tests/partial-sigs/should_compile/SuperCls.stderr
testsuite/tests/partial-sigs/should_compile/T10403.stderr
testsuite/tests/partial-sigs/should_compile/T11016.stderr
testsuite/tests/partial-sigs/should_compile/T11192.stderr
testsuite/tests/partial-sigs/should_compile/T12033.stderr
testsuite/tests/partial-sigs/should_compile/T12844.stderr
testsuite/tests/partial-sigs/should_compile/T12845.stderr
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
testsuite/tests/partial-sigs/should_fail/T10045.stderr
testsuite/tests/partial-sigs/should_fail/T12634.stderr
testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
testsuite/tests/perf/compiler/T13035.stderr
testsuite/tests/polykinds/T14265.hs [new file with mode: 0644]
testsuite/tests/polykinds/T14265.stderr [new file with mode: 0644]
testsuite/tests/polykinds/all.T