Kind-check CUSK associated types separately
authorRichard Eisenberg <rae@cs.brynmawr.edu>
Thu, 5 Jul 2018 19:09:50 +0000 (15:09 -0400)
committerRichard Eisenberg <rae@cs.brynmawr.edu>
Tue, 10 Jul 2018 23:08:21 +0000 (19:08 -0400)
commit030211d21207dabb7a4bf21cc9af6fa5eb066db1
treea2a168f516af6fbf354f5094548a9aa5fc648bac
parent042df603cbb5a77ec13ccfec2ce7bad2bb940aae
Kind-check CUSK associated types separately

Previously, we kind-checked associated types while while still
figuring out the kind of a CUSK class. This caused trouble, as
documented in Note [Don't process associated types in kcLHsQTyVars]
in TcTyClsDecls. This commit moves this process after the initial
kind of the class is determined.

Fixes #15142.

Test case: indexed-types/should_compile/T15142.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcTyClsDecls.hs
testsuite/tests/indexed-types/should_compile/T15142.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/all.T