summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-11-05 16:11:36 +0000
committerIan Lynagh <igloo@earth.li>2011-11-05 16:11:36 +0000
commit9caf8050cbcf4b1f67ba1fa2ceaf58825f10c079 (patch)
tree62834662aa7e76954c010b311b4564ec7ce9d419 /testsuite/tests/arrows
parent07e311d66ebe005164db7531171a4468cc204e2a (diff)
downloadhaskell-9caf8050cbcf4b1f67ba1fa2ceaf58825f10c079.tar.gz
Add a test for #5380
Diffstat (limited to 'testsuite/tests/arrows')
-rw-r--r--testsuite/tests/arrows/should_fail/T5380.hs7
-rw-r--r--testsuite/tests/arrows/should_fail/T5380.stderr22
-rw-r--r--testsuite/tests/arrows/should_fail/all.T1
3 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/should_fail/T5380.hs b/testsuite/tests/arrows/should_fail/T5380.hs
new file mode 100644
index 0000000000..855484f450
--- /dev/null
+++ b/testsuite/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/testsuite/tests/arrows/should_fail/T5380.stderr b/testsuite/tests/arrows/should_fail/T5380.stderr
new file mode 100644
index 0000000000..f1846dd425
--- /dev/null
+++ b/testsuite/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/testsuite/tests/arrows/should_fail/all.T b/testsuite/tests/arrows/should_fail/all.T
index 4da90faba3..2aaa27d9ec 100644
--- a/testsuite/tests/arrows/should_fail/all.T
+++ b/testsuite/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, [''])