Add test for #12589
authorRyan Scott <ryan.gl.scott@gmail.com>
Wed, 12 Oct 2016 23:16:46 +0000 (19:16 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Wed, 12 Oct 2016 23:16:46 +0000 (19:16 -0400)
Commit af21e38855f7d517774542b360178b05045ecb08 fixed #12598. Let's add a test
to make sure it stays fixed.

testsuite/tests/typecheck/should_fail/T12589.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12589.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T12589.hs b/testsuite/tests/typecheck/should_fail/T12589.hs
new file mode 100644 (file)
index 0000000..5f45474
--- /dev/null
@@ -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 (file)
index 0000000..a2587e2
--- /dev/null
@@ -0,0 +1,2 @@
+
+T12589.hs:13:3: error: Variable not in scope: (&) :: t0 -> t1 -> t
index d040b58..4c16c0d 100644 (file)
@@ -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, [''])