Fix an outright bug in the unflattener
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 14 Dec 2017 13:25:48 +0000 (13:25 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 14 Dec 2017 13:27:57 +0000 (13:27 +0000)
commitb1ea0475894713b9fc753bf288589e0dc3175083
tree8b8b4528420a07b92fe6a2db4cb8cfc813a51eeb
parent6f6d1050d96e6697cc4559eb54d03959efe28de1
Fix an outright bug in the unflattener

Trac #14554 showed up an outright bug in the unflattening code in
TcFlatten.  I was filling in a coercion with the wrong coercion (a Syn
in the wrong place).  Result: "Bad coercion hole" assertion failures,
and Core Lint Errors.

Easily fixed, and the code is simpler too.
compiler/typecheck/TcFlatten.hs
testsuite/tests/indexed-types/should_compile/T14554.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/all.T