Wibble to Taming the Kind Inference Monster
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 7 Dec 2018 14:25:30 +0000 (14:25 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 7 Dec 2018 14:44:26 +0000 (14:44 +0000)
commit5b7ca03995c1d5fbd29ba0e327bb2a1f344c9419
tree24d1d51df1ea68c0216d532cf3edac4639dcfcb7
parenteee1b61f85d949aa7c4bc496b5579cf759d1861e
Wibble to Taming the Kind Inference Monster

I had allowed rename/should_fail/T15828 (Trac #15828) to regress a bit.
The main payload of this patch is to fix that problem, at the cost of
more contortions in checkConsistentFamInst.  Oh well, at least they are
highly localised.

I also update the -ddump-types code in TcRnDriver to print out some
more expicit information about each type constructor, thus instead of

   DF{3} :: forall k. * -> k -> *

we get

   data family DF{3} :: forall k. * -> k -> *

Remember, this is debug-printing only.  This change is the reason
that so many .stderr files change.
38 files changed:
compiler/typecheck/ClsInst.hs
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcValidity.hs
compiler/types/Coercion.hs
compiler/types/FamInstEnv.hs
testsuite/tests/dependent/should_compile/T15743.stderr
testsuite/tests/dependent/should_compile/T15743e.stderr
testsuite/tests/indexed-types/should_compile/T15711.stderr
testsuite/tests/indexed-types/should_compile/T15852.stderr
testsuite/tests/indexed-types/should_compile/T3017.stderr
testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr
testsuite/tests/indexed-types/should_fail/SimpleFail2a.stderr
testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr
testsuite/tests/indexed-types/should_fail/T11450.stderr
testsuite/tests/indexed-types/should_fail/T12041.stderr
testsuite/tests/indexed-types/should_fail/T14230.stderr
testsuite/tests/indexed-types/should_fail/T9160.stderr
testsuite/tests/partial-sigs/should_compile/ADT.stderr
testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
testsuite/tests/polykinds/T14450.stderr
testsuite/tests/polykinds/T15592.stderr
testsuite/tests/polykinds/T15592b.stderr
testsuite/tests/rename/should_fail/T15828.stderr
testsuite/tests/roles/should_compile/Roles1.stderr
testsuite/tests/roles/should_compile/Roles14.stderr
testsuite/tests/roles/should_compile/Roles2.stderr
testsuite/tests/roles/should_compile/Roles3.stderr
testsuite/tests/roles/should_compile/Roles4.stderr
testsuite/tests/roles/should_compile/T8958.stderr
testsuite/tests/th/TH_Roles2.stderr
testsuite/tests/typecheck/should_compile/T12763.stderr
testsuite/tests/typecheck/should_compile/tc231.stderr