Fix egregious blunder in the type flattener
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 9 Apr 2014 21:47:09 +0000 (22:47 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 10 Apr 2014 07:12:51 +0000 (08:12 +0100)
commitb8132a9d2fdb93c5d30107b1d531dd73ac27b262
treed69d15d141de92c4edb2c7b9f1d9d0680e5df0d6
parentb4dd5667fe84cb6030d296e9e4563d4de62f718d
Fix egregious blunder in the type flattener

In tidying up the flattener I introduced an error that no
regression test caught, giving rise to Trac #8978, #8979.
It shows up if you have a type synonym whose RHS mentions
type functions, such sas
     type family F a
     type T a = (F a, a)   -- This synonym isn't properly flattened

The fix is easy, but sadly the bug is in the released GHC 7.8.1
compiler/typecheck/TcCanonical.lhs
testsuite/tests/indexed-types/should_compile/T8978.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/T8979.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/all.T
testsuite/tests/indexed-types/should_fail/T5439.stderr
testsuite/tests/indexed-types/should_fail/T5934.stderr