summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/all.T
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-01-03 20:11:31 -0500
committerRyan Scott <ryan.gl.scott@gmail.com>2018-01-03 20:11:31 -0500
commit649e777211fe08432900093002547d7358f92d82 (patch)
treea8951ccb028655b79d467fbebb83242d7c8e0ab1 /testsuite/tests/deriving/should_compile/all.T
parent7a25659efc4d22086a9e75dc90e3701c1706c625 (diff)
downloadhaskell-649e777211fe08432900093002547d7358f92d82.tar.gz
Make typeToLHsType produce kind signatures for tycon applications
Summary: `GeneralizedNewtypeDeriving` generates calls to `coerce` which take visible type arguments. These types must be produced by way of `typeToLHsType`, which converts a `Type` to an `LHsType`. However, `typeToLHsType` was leaving off important kind information when a `Type` contained a poly-kinded tycon application, leading to incorrectly generated code in #14579. This fixes the issue by tweaking `typeToLHsType` to generate explicit kind signatures for tycon applications. This makes the generated code noisier, but at least the program from #14579 now works correctly. Test Plan: make test TEST=T14579 Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14579 Differential Revision: https://phabricator.haskell.org/D4264
Diffstat (limited to 'testsuite/tests/deriving/should_compile/all.T')
-rw-r--r--testsuite/tests/deriving/should_compile/all.T1
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index af9a577a89..8752bbdb73 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -99,3 +99,4 @@ test('T14094', normal, compile, [''])
test('T14339', normal, compile, [''])
test('T14331', normal, compile, [''])
test('T14578', normal, compile, ['-ddump-deriv -dsuppress-uniques'])
+test('T14579', normal, compile, [''])