Take account of kinds in promoteTcType
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 24 Oct 2016 16:01:41 +0000 (17:01 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 24 Oct 2016 16:01:41 +0000 (17:01 +0100)
commit08ba691ad55f30e67466628125244392c48ce1ab
treebfa0d2fcade2a1f0584e94d4951a3524ba06eda8
parent1221f8104bb5123c18bd5b840cde9ab2e71247d5
Take account of kinds in promoteTcType

One of the ASSERT failures in Trac #12762, namely the one for T4439,
showed that I had not dealt correctly with promoting the kind of
a type in promoteTcType.

Happily I could fix this by simplifying InferRes (eliminating the
ir_kind field), so things get better. And the ASSERT is fixed.
compiler/typecheck/TcExpr.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcMType.hs
compiler/typecheck/TcPatSyn.hs
compiler/typecheck/TcType.hs
compiler/typecheck/TcUnify.hs
testsuite/tests/gadt/gadt7.stderr
testsuite/tests/indexed-types/should_fail/T2664.stderr
testsuite/tests/indexed-types/should_fail/T9662.stderr
testsuite/tests/polykinds/T7438.stderr
testsuite/tests/polykinds/T9222.stderr