Filter out invisible kind arguments during TH reification
authorRyanGlScott <ryan.gl.scott@gmail.com>
Mon, 11 Apr 2016 00:34:55 +0000 (02:34 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 11 Apr 2016 00:52:18 +0000 (02:52 +0200)
commit02a5c580b6078630842f4c3db5d92631fada21e9
tree72afe5bd0818e27a9e6e3d75aff6fd06518841a1
parent46e8f199e4d3baffa306a40082fbc2fce67f779f
Filter out invisible kind arguments during TH reification

Previously, all kind arguments were being reified, which would cause
something like this:

```
type Id a = a
data Proxy (a :: Id k) = Proxy
```

to output

```
data Proxy (a :: Id * k) = Proxy
```

when `Proxy`'s `Info` is reified. The fix is simple: simply call
`filterOutInvisibleTypes` on the kind arguments of a kind synonym
application.

Fixes #11463.

Test Plan: ./validate

Reviewers: austin, bgamari, goldfire

Reviewed By: goldfire

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2081

GHC Trac Issues: #11463
compiler/typecheck/TcSplice.hs
testsuite/tests/th/T11463.hs [new file with mode: 0644]
testsuite/tests/th/T11463.stdout [new file with mode: 0644]
testsuite/tests/th/all.T