[commit: testsuite] master: Test Trac #7368 (8ce4851)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/8ce4851c52e016d517fb1dbeb338f1785b92aa3e

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

commit 8ce4851c52e016d517fb1dbeb338f1785b92aa3e
Author: Simon Peyton Jones <[email protected]>
Date:   Fri Oct 26 16:41:25 2012 +0100

    Test Trac #7368

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

 tests/typecheck/should_fail/T7368.hs     |    9 +++++++++
 tests/typecheck/should_fail/T7368.stderr |   20 ++++++++++++++++++++
 tests/typecheck/should_fail/all.T        |    1 +
 3 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_fail/T7368.hs b/tests/typecheck/should_fail/T7368.hs
new file mode 100644
index 0000000..088f874
--- /dev/null
+++ b/tests/typecheck/should_fail/T7368.hs
@@ -0,0 +1,9 @@
+module T7368 where
+
+f  = b  (l  () )
+
+l :: b a -> c b
+l = undefined
+
+b :: (a -> b) -> c
+b = undefined
\ No newline at end of file
diff --git a/tests/typecheck/should_fail/T7368.stderr b/tests/typecheck/should_fail/T7368.stderr
new file mode 100644
index 0000000..e189c89
--- /dev/null
+++ b/tests/typecheck/should_fail/T7368.stderr
@@ -0,0 +1,20 @@
+
+T7368.hs:3:10:
+    Couldn't match kind `* -> *' with `*'
+    When matching types
+      c0 :: (* -> *) -> *
+      (->) a0 :: * -> *
+    Expected type: a0 -> b0
+      Actual type: c0 b1
+    In the return type of a call of `l'
+    Probable cause: `l' is applied to too many arguments
+    In the first argument of `b', namely `(l ())'
+    In the expression: b (l ())
+
+T7368.hs:3:13:
+    Couldn't match type `()' with `b0 a1'
+    Expected type: b1 a1
+      Actual type: ()
+    In the first argument of `l', namely `()'
+    In the first argument of `b', namely `(l ())'
+    In the expression: b (l ())
diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T
index 42737d4..cbc393b 100644
--- a/tests/typecheck/should_fail/all.T
+++ b/tests/typecheck/should_fail/all.T
@@ -283,3 +283,4 @@ test('T2534', normal, compile_fail, [''])
 test('T7175', normal, compile_fail, [''])
 test('T7210', normal, compile_fail, [''])
 test('T6161', normal, compile_fail, [''])
+test('T7368', normal, compile_fail, [''])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.