canCFunEqCan: use isTcReflexiveCo (not isTcReflCo)
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 3 Sep 2018 08:00:49 +0000 (09:00 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 3 Sep 2018 08:06:09 +0000 (09:06 +0100)
commit2e226a46c422c12f78dc3d3f62fe5a15e22bd986
treef33c6c6853a22a49c58edf5488180a2a73f85f97
parented789516e201e4fad771e5588da47a62e53b42b8
canCFunEqCan: use isTcReflexiveCo (not isTcReflCo)

As Trac #15577 showed, it was possible for a /homo-kinded/
constraint to trigger the /hetero-kinded/ branch of canCFunEqCan,
and that triggered an infinite loop.

The fix is easier, but there remains a deeper questions: why is
the flattener producing giant refexive coercions?
compiler/typecheck/TcCanonical.hs
testsuite/tests/polykinds/T15577.hs [new file with mode: 0644]
testsuite/tests/polykinds/T15577.stderr [new file with mode: 0644]
testsuite/tests/polykinds/all.T