Fix #15308 by suppressing invisble args more rigorously
authorRyan Scott <ryan.gl.scott@gmail.com>
Thu, 5 Jul 2018 12:30:02 +0000 (08:30 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Thu, 5 Jul 2018 12:30:02 +0000 (08:30 -0400)
commit93b7ac8d73885369f61f6eb6147352d45de4e957
treefac12c8cb7780fbd053bb632e1f0448995b93ff3
parent59a15a56e180b59656e45df04f7df61de8298881
Fix #15308 by suppressing invisble args more rigorously

Summary:
There was a buglet in `stripInvisArgs` (which is part of the
pretty-printing pipeline for types) in which only invisble arguments
which came before any visible arguments would be suppressed, but any
invisble arguments that came //after// visible ones would still be
printed, even if `-fprint-explicit-kinds`  wasn't enabled.
The fix is simple: make `stripInvisArgs` recursively process the
remaining types even after a visible argument is encountered.

Test Plan: make test TEST=T15308

Reviewers: goldfire, bgamari

Reviewed By: bgamari

Subscribers: simonpj, rwbarton, thomie, carter

GHC Trac Issues: #15308

Differential Revision: https://phabricator.haskell.org/D4891
compiler/iface/IfaceType.hs
testsuite/tests/dependent/should_fail/T15308.hs [new file with mode: 0644]
testsuite/tests/dependent/should_fail/T15308.stderr [new file with mode: 0644]
testsuite/tests/dependent/should_fail/all.T
testsuite/tests/typecheck/should_fail/T12785b.stderr