summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-12-15 15:27:01 -0500
committerBen Gamari <ben@smart-cactus.org>2016-12-15 15:27:02 -0500
commit81c49562570a403e8470f73f4decd3e0cb891983 (patch)
tree8eb3b888e67c84a99e691abcec058194494c22eb /testsuite
parent0cad52d6395487b617edef2b131909d3b4085be4 (diff)
downloadhaskell-81c49562570a403e8470f73f4decd3e0cb891983.tar.gz
testsuite: Add test for #12966
This isn't exactly a typechecker test, but it was the most appropriate directory I could think of. The issue being tested is fixed. Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2857 GHC Trac Issues: #12966
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_fail/T12966.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/T12966.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T12966.hs b/testsuite/tests/typecheck/should_fail/T12966.hs
new file mode 100644
index 0000000000..27bcff6708
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T12966.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE RankNTypes #-}
+module T12966 where
+-- This should fail with a proper error message, not a compiler panic.
+type Maybeify c = forall d. (c d) => ((~) (Maybe d))
diff --git a/testsuite/tests/typecheck/should_fail/T12966.stderr b/testsuite/tests/typecheck/should_fail/T12966.stderr
new file mode 100644
index 0000000000..dd63bf47ca
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T12966.stderr
@@ -0,0 +1,6 @@
+
+T12966.hs:4:39: error:
+ • Expecting one more argument to ‘(~) (Maybe d)’
+ Expected a type, but ‘(~) (Maybe d)’ has kind ‘* -> Constraint’
+ • In the type ‘forall d. (c d) => ((~) (Maybe d))’
+ In the type declaration for ‘Maybeify’
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 6f99a94ff4..9f578a02d2 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -432,3 +432,4 @@ test('T12529', normal, compile_fail, [''])
test('T12729', normal, compile_fail, [''])
test('T12803', normal, compile_fail, [''])
test('T12042', extra_clean(['T12042a.hi', 'T12042a.o', 'T12042.hi-boot', 'T12042.o-boot']), multimod_compile_fail, ['T12042', ''])
+test('T12966', normal, compile_fail, ['']) \ No newline at end of file