Fix SigTvs at the kind level
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 11 Dec 2017 15:53:32 +0000 (15:53 +0000)
committerBen Gamari <ben@smart-cactus.org>
Sun, 14 Jan 2018 19:35:11 +0000 (14:35 -0500)
commit40a31b386a893f06667229e5ecf985de6cf87633
tree7d89ce36fb8767923ca6d653f9bc371a4e054443
parentdfe049fd04b900edba923af2dbca3ee81ff594ce
Fix SigTvs at the kind level

This patch fixes two bugs in the treatment of SigTvs at the
kind level:

- We should always generalise them, never default them
  (Trac #14555, #14563)

- We should check if they get unified with each other
  (Trac #11203)

Both are described in TcHsType
   Note [Kind generalisation and SigTvs]

(cherry picked from commit 8361b2c5a9f7a00f0024f44a43b851998ae41e33)
15 files changed:
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcMType.hs
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcTyClsDecls.hs
compiler/typecheck/TcType.hs
compiler/types/TyCon.hs
testsuite/tests/polykinds/T11203.hs [new file with mode: 0644]
testsuite/tests/polykinds/T11203.stderr [new file with mode: 0644]
testsuite/tests/polykinds/T11821a.stderr [new file with mode: 0644]
testsuite/tests/polykinds/T14555.hs [new file with mode: 0644]
testsuite/tests/polykinds/T14555.stderr [new file with mode: 0644]
testsuite/tests/polykinds/T14563.hs [new file with mode: 0644]
testsuite/tests/polykinds/T14563.stderr [new file with mode: 0644]
testsuite/tests/polykinds/all.T