[commit: testsuite] master: Test Trac #7851 (aee9b17)

Simon Peyton Jones simonpj at microsoft.com
Tue Apr 30 10:51:45 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

https://github.com/ghc/testsuite/commit/aee9b17af99b10ce112ddcc58b640d7ba0df8f06

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

commit aee9b17af99b10ce112ddcc58b640d7ba0df8f06
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Apr 29 17:39:37 2013 +0100

    Test Trac #7851

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

 tests/typecheck/should_fail/T7851.hs     |    6 ++++++
 tests/typecheck/should_fail/T7851.stderr |    8 ++++++++
 tests/typecheck/should_fail/all.T        |    1 +
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_fail/T7851.hs b/tests/typecheck/should_fail/T7851.hs
new file mode 100644
index 0000000..686233c
--- /dev/null
+++ b/tests/typecheck/should_fail/T7851.hs
@@ -0,0 +1,6 @@
+module T7851 where
+
+import Control.Monad.Trans.State
+
+bar = do print
+         print "Hello"
diff --git a/tests/typecheck/should_fail/T7851.stderr b/tests/typecheck/should_fail/T7851.stderr
new file mode 100644
index 0000000..ba5fc7c
--- /dev/null
+++ b/tests/typecheck/should_fail/T7851.stderr
@@ -0,0 +1,8 @@
+
+T7851.hs:5:10:
+    Couldn't match expected type ‛IO a0’ with actual type ‛a1 -> IO ()’
+    Probable cause: ‛print’ is applied to too few arguments
+    In a stmt of a 'do' block: print
+    In the expression:
+      do { print;
+           print "Hello" }
diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T
index 8acc582..768b6ed 100644
--- a/tests/typecheck/should_fail/all.T
+++ b/tests/typecheck/should_fail/all.T
@@ -305,3 +305,4 @@ test('TcNoNullaryTC', when(compiler_lt('ghc', '7.7'), skip), compile_fail, [''])
 test('TcNullaryTCFail', when(compiler_lt('ghc', '7.7'), skip), compile_fail, [''])
 test('T7857', normal, compile_fail, [''])
 test('T7778', normal, compile_fail, [''])
+test('T7851', normal, compile_fail, [''])





More information about the ghc-commits mailing list