Really fix Trac #14158
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 30 Aug 2017 15:19:37 +0000 (16:19 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 31 Aug 2017 07:16:58 +0000 (08:16 +0100)
commit2c133b67df374c73bc8069cefd7d57e1d2a14fc3
tree01305aaf0cb46f36511adfd10d586f217263f3ba
parent3790ea906da400cd7ff6dbc0ec061bd99afaf84a
Really fix Trac #14158

I dug more into how #14158 started working. I temporarily reverted the
patch that "fixed" it, namely

    commit a6c448b403dbe8720178ca82100f34baedb1f47e
    Author: Simon Peyton Jones <simonpj@microsoft.com>
    Date:   Mon Aug 28 17:33:59 2017 +0100

    Small refactor of getRuntimeRep

Sure enough, there was a real bug, described in the new
TcExpr Note [Visible type application zonk]

In general, syntactic substituion should be kind-preserving!
Maybe we should check that invariant...
compiler/typecheck/TcExpr.hs
testsuite/tests/typecheck/should_compile/T14158.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T