summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/should_compile/arrowif1.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/arrows/should_compile/arrowif1.hs')
-rw-r--r--testsuite/tests/arrows/should_compile/arrowif1.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/should_compile/arrowif1.hs b/testsuite/tests/arrows/should_compile/arrowif1.hs
new file mode 100644
index 0000000000..404b1f164c
--- /dev/null
+++ b/testsuite/tests/arrows/should_compile/arrowif1.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE Arrows #-}
+
+module ShouldCompile where
+
+import Control.Arrow
+
+f :: ArrowChoice a => a (Int,Int,Int) Int
+f = proc (x,y,z) -> if x < y then returnA -< x+y else returnA -< x+z
+
+g :: ArrowChoice a => Int -> a (Int,Int) Int
+g x = proc (y,z) -> if x < y then returnA -< x+y else returnA -< x+z