summaryrefslogtreecommitdiff
path: root/testsuite/tests/generics/all.T
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-04-19 12:36:42 -0400
committerBen Gamari <ben@smart-cactus.org>2018-04-19 13:18:14 -0400
commitb08a6d75e0440f33260bea5319b8c3f871b42f6e (patch)
treeeeae0a52bc64aac7a1a9e2d83e25053f0b87e243 /testsuite/tests/generics/all.T
parentcac8be611e7e80ed80e24b15faac9e1ac0a07247 (diff)
downloadhaskell-b08a6d75e0440f33260bea5319b8c3f871b42f6e.tar.gz
Fix #15012 with a well-placed use of Any
Previously, derived `Generic1` instances could have associated `Rep1` type family instances with unbound variables, such as in the following example: ```lang=haskell data T a = MkT (FakeOut a) deriving Generic1 type FakeOut a = Int ==> instance Generic1 T where type Rep1 T = ... (Rec0 (FakeOut a)) ``` Yikes! To avoid this, we simply map the last type variable in a derived `Generic1` instance to `Any`. Test Plan: make test TEST=T15012 Reviewers: bgamari Reviewed By: bgamari Subscribers: simonpj, thomie, carter GHC Trac Issues: #15012 Differential Revision: https://phabricator.haskell.org/D4602
Diffstat (limited to 'testsuite/tests/generics/all.T')
-rw-r--r--testsuite/tests/generics/all.T2
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/tests/generics/all.T b/testsuite/tests/generics/all.T
index 1d4aeaee38..f127f7895f 100644
--- a/testsuite/tests/generics/all.T
+++ b/testsuite/tests/generics/all.T
@@ -43,3 +43,5 @@ test('T10361a', normal, compile, [''])
test('T10361b', normal, compile, [''])
test('T11358', normal, compile_and_run, [''])
test('T12220', normal, compile, [''])
+test('T15012', [extra_files(['T15012.hs', 'T15012a.hs'])], run_command,
+ ['$MAKE -s --no-print-directory T15012'])