[commit: ghc] master: Add test for #12589 (042c593)

git at git.haskell.org git at git.haskell.org
Wed Oct 12 23:19:44 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/042c5930bff239337d21836db5b8d0ebf0180ffc/ghc

>---------------------------------------------------------------

commit 042c5930bff239337d21836db5b8d0ebf0180ffc
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.


>---------------------------------------------------------------

042c5930bff239337d21836db5b8d0ebf0180ffc
 testsuite/tests/typecheck/should_fail/T12589.hs     | 13 +++++++++++++
 testsuite/tests/typecheck/should_fail/T12589.stderr |  2 ++
 testsuite/tests/typecheck/should_fail/all.T         |  1 +
 3 files changed, 16 insertions(+)

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 d040b58..4c16c0d 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, [''])



More information about the ghc-commits mailing list