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 <simo...@microsoft.com>
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, [''])



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to