Improve error reporting for untouchable type variables
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 8 Apr 2014 16:37:45 +0000 (17:37 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 8 Apr 2014 16:37:59 +0000 (17:37 +0100)
commit50bfd4219157473fac47c70993fc2023a162a7f3
tree13259e4066e4a22f5518256eca36e335938e4ee4
parentcc3ccf9f47c7f4684cdd2b08d0e2acf50b69bc18
Improve error reporting for untouchable type variables

This change adds a suggestion
    Possible fix: add a type signature for â€˜f’
when we have a GADT-style definition with a
type we can't figure out.

See Note [Suggest adding a type signature] in TcErrors.

This initially came up in the discussion of Trac #8968.
compiler/typecheck/TcErrors.lhs
testsuite/tests/gadt/gadt-escape1.stderr
testsuite/tests/gadt/gadt13.stderr
testsuite/tests/gadt/gadt7.stderr
testsuite/tests/polykinds/T7438.stderr
testsuite/tests/polykinds/T7594.stderr