Fix Lint of unsaturated type families
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 25 Sep 2018 14:19:22 +0000 (15:19 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 26 Sep 2018 03:41:54 +0000 (04:41 +0100)
commit4bdb10ca7ba14f00dd62270eadab4f93238227bc
tree66e5bfd3b113efa078f278ceb8005cee4f2d15f5
parenta74413479cf4bf84fcacf1c5f76da1c1610d208b
Fix Lint of unsaturated type families

GHC allows types to have unsaturated type synonyms and type families,
provided they /are/ saturated if you expand all type synonyms.

TcValidity carefully checked this; see check_syn_tc_app.  But
Lint only did half the job, adn that led to Trac #15664.

This patch just teaches Core Lint to be as clever as TcValidity.
compiler/coreSyn/CoreLint.hs
testsuite/tests/indexed-types/should_compile/T15664.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/all.T