summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2017-05-04 14:19:26 -0400
committerBen Gamari <ben@smart-cactus.org>2017-05-04 18:20:45 -0400
commit03ca391f14f97486fd1c66d9c9d99686ae25cc10 (patch)
tree437e4446f141f4238a23874621a8c3b0d845ad7a /testsuite
parent4fcaf8e97db89b0c040ca33f0503faf3403b918f (diff)
downloadhaskell-03ca391f14f97486fd1c66d9c9d99686ae25cc10.tar.gz
Add regression test for #11616
The code in #11616 has been working for a while (ever since 8.0.1), so let's add a regression test for it to put the nail in the coffin. Test Plan: make test TEST=T11616 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #11616 Differential Revision: https://phabricator.haskell.org/D3531
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/polykinds/T11616.hs19
-rw-r--r--testsuite/tests/polykinds/all.T1
2 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T11616.hs b/testsuite/tests/polykinds/T11616.hs
new file mode 100644
index 0000000000..378032b7ed
--- /dev/null
+++ b/testsuite/tests/polykinds/T11616.hs
@@ -0,0 +1,19 @@
+{-# LANGUAGE AllowAmbiguousTypes #-}
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE TypeInType #-}
+module T11616 where
+
+class Whoami a where
+ whoami :: String
+
+instance Whoami Int where
+ whoami = "int"
+
+instance Whoami Bool where
+ whoami = "[y/n]"
+
+instance Whoami Maybe where
+ whoami = "call me maybe"
+
+whoisint :: String
+whoisint = whoami @Int
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index e534e082ce..b59cbe65f1 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -140,6 +140,7 @@ test('T11362', normal, compile, ['-dunique-increment=-1'])
# -dunique-increment=-1 doesn't work inside the file
test('T11399', normal, compile_fail, [''])
test('T11611', normal, compile_fail, [''])
+test('T11616', normal, compile, [''])
test('T11648', normal, compile, [''])
test('T11648b', normal, compile_fail, [''])
test('KindVType', normal, compile_fail, [''])