Move eta-reduced coaxiom compatibility handling quirks into FamInstEnv.
authormniip <mniip@mniip.com>
Thu, 1 Nov 2018 22:33:10 +0000 (18:33 -0400)
committerBen Gamari <ben@smart-cactus.org>
Fri, 2 Nov 2018 00:32:23 +0000 (20:32 -0400)
commitf877d9cc99dd1ba0c038e70527031e9ba0934cd3
tree6a225a9cfafc670ca0fb16cd4402efcc059788b6
parent1c92f193ee406545daedd06e0b9d5d7354d9af64
Move eta-reduced coaxiom compatibility handling quirks into FamInstEnv.

The quirk caused an issue where GHC concluded that 'D' is possibly
unifiable with 'D a' (the two types could have the same kind if D is a
data family).

Test Plan:
Ensure T9371 stays fixed.
Introduce T15704

Reviewers: goldfire, bgamari

Reviewed By: goldfire

Subscribers: RyanGlScott, rwbarton, carter

GHC Trac Issues: #15704

Differential Revision: https://phabricator.haskell.org/D5206
compiler/types/FamInstEnv.hs
compiler/types/Unify.hs
compiler/utils/Util.hs
testsuite/tests/indexed-types/should_compile/T15704.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/all.T