[commit: testsuite] master: Add a test for #5380 (bca39ff)
Ian Lynagh
igloo at earth.li
Sat Nov 5 19:17:59 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/bca39ff21eede08b1e7e812dbe2c7c130ab235ca
>---------------------------------------------------------------
commit bca39ff21eede08b1e7e812dbe2c7c130ab235ca
Author: Ian Lynagh <igloo at earth.li>
Date: Sat Nov 5 16:11:36 2011 +0000
Add a test for #5380
>---------------------------------------------------------------
tests/arrows/should_fail/T5380.hs | 7 +++++++
tests/arrows/should_fail/T5380.stderr | 22 ++++++++++++++++++++++
tests/arrows/should_fail/all.T | 1 +
3 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/tests/arrows/should_fail/T5380.hs b/tests/arrows/should_fail/T5380.hs
new file mode 100644
index 0000000..855484f
--- /dev/null
+++ b/tests/arrows/should_fail/T5380.hs
@@ -0,0 +1,7 @@
+
+{-# LANGUAGE Arrows #-}
+
+module T5380 where
+
+testB :: not_bool -> (() -> ()) -> () -> not_unit
+testB b f = proc () -> if b then f -< () else f -< ()
diff --git a/tests/arrows/should_fail/T5380.stderr b/tests/arrows/should_fail/T5380.stderr
new file mode 100644
index 0000000..f1846dd
--- /dev/null
+++ b/tests/arrows/should_fail/T5380.stderr
@@ -0,0 +1,22 @@
+
+T5380.hs:7:27:
+ Couldn't match type `not_bool' with `Bool'
+ `not_bool' is a rigid type variable bound by
+ the type signature for
+ testB :: not_bool -> (() -> ()) -> () -> not_unit
+ at T5380.hs:7:1
+ In the expression: b
+ In the expression: proc () -> if b then f -< () else f -< ()
+ In an equation for `testB':
+ testB b f = proc () -> if b then f -< () else f -< ()
+
+T5380.hs:7:47:
+ Couldn't match type `not_unit' with `()'
+ `not_unit' is a rigid type variable bound by
+ the type signature for
+ testB :: not_bool -> (() -> ()) -> () -> not_unit
+ at T5380.hs:7:1
+ Expected type: () -> not_unit
+ Actual type: () -> ()
+ In the expression: f
+ In the expression: proc () -> if b then f -< () else f -< ()
diff --git a/tests/arrows/should_fail/all.T b/tests/arrows/should_fail/all.T
index 4da90fa..2aaa27d 100644
--- a/tests/arrows/should_fail/all.T
+++ b/tests/arrows/should_fail/all.T
@@ -5,3 +5,4 @@ test('arrowfail002', normal, compile_fail, [''])
test('arrowfail003', normal, compile_fail, [''])
test('arrowfail004', normal, compile_fail, [''])
test('T2111', normal, compile_fail, [''])
+test('T5380', normal, compile_fail, [''])
More information about the Cvs-ghc
mailing list