[commit: ghc] ghc-8.0: Add test for #12589 (9467dfa)
git at git.haskell.org
git at git.haskell.org
Tue Oct 18 22:45:39 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/9467dfa8cc63de5742a27caf0cdab997156c7409/ghc
>---------------------------------------------------------------
commit 9467dfa8cc63de5742a27caf0cdab997156c7409
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Wed Oct 12 19:16:46 2016 -0400
Add test for #12589
Commit af21e38855f7d517774542b360178b05045ecb08 fixed #12598. Let's add a test
to make sure it stays fixed.
(cherry picked from commit 042c5930bff239337d21836db5b8d0ebf0180ffc)
>---------------------------------------------------------------
9467dfa8cc63de5742a27caf0cdab997156c7409
testsuite/tests/typecheck/should_fail/T12589.hs | 13 +++++++++++++
testsuite/tests/typecheck/should_fail/T12589.stderr | 2 ++
testsuite/tests/typecheck/should_fail/all.T | 2 +-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/testsuite/tests/typecheck/should_fail/T12589.hs b/testsuite/tests/typecheck/should_fail/T12589.hs
new file mode 100644
index 0000000..5f45474
--- /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 0000000..a2587e2
--- /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 985a7c4..1c28f11 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -426,4 +426,4 @@ test('T11990a', normal, compile_fail, [''])
test('T11990b', normal, compile_fail, [''])
test('T12124', normal, compile_fail, [''])
test('T12529', normal, compile_fail, [''])
-
+test('T12589', normal, compile_fail, [''])
More information about the ghc-commits
mailing list