summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2016-10-12 19:16:46 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2016-10-12 19:16:46 -0400
commit042c5930bff239337d21836db5b8d0ebf0180ffc (patch)
tree35276a35957ad9f1c2a1c6334e33e22b9da1d209 /testsuite/tests
parent184d7cb8278b9c6cb3f9786a96f081d08e4640db (diff)
downloadhaskell-042c5930bff239337d21836db5b8d0ebf0180ffc.tar.gz
Add test for #12589
Commit af21e38855f7d517774542b360178b05045ecb08 fixed #12598. Let's add a test to make sure it stays fixed.
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/typecheck/should_fail/T12589.hs13
-rw-r--r--testsuite/tests/typecheck/should_fail/T12589.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T12589.hs b/testsuite/tests/typecheck/should_fail/T12589.hs
new file mode 100644
index 0000000000..5f45474e18
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T12589.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE TypeApplications #-}
+{-# OPTIONS_GHC -fdefer-typed-holes #-}
+module T12589 where
+
+import Data.Proxy
+
+hcpure :: proxy c -> (forall a. c a => f a) -> h f xs
+hcpure _ _ = undefined
+
+a = minBound
+ & hcpure (Proxy @Bounded)
diff --git a/testsuite/tests/typecheck/should_fail/T12589.stderr b/testsuite/tests/typecheck/should_fail/T12589.stderr
new file mode 100644
index 0000000000..a2587e2778
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T12589.stderr
@@ -0,0 +1,2 @@
+
+T12589.hs:13:3: error: Variable not in scope: (&) :: t0 -> t1 -> t
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index d040b5853e..4c16c0d439 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -427,3 +427,4 @@ test('T12177', normal, compile_fail, [''])
test('T12406', normal, compile_fail, [''])
test('T12170a', normal, compile_fail, [''])
test('T12124', normal, compile_fail, [''])
+test('T12589', normal, compile_fail, [''])