summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/should_compile/arrowapply5.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/arrows/should_compile/arrowapply5.hs')
-rw-r--r--testsuite/tests/arrows/should_compile/arrowapply5.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/should_compile/arrowapply5.hs b/testsuite/tests/arrows/should_compile/arrowapply5.hs
new file mode 100644
index 0000000000..46d1dc587f
--- /dev/null
+++ b/testsuite/tests/arrows/should_compile/arrowapply5.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE Arrows #-}
+
+module ShouldCompile where
+
+-- variables bound inside the left argument of -< should be in scope
+
+import Control.Arrow
+
+f :: (Num b, Arrow a) => a b b
+f = proc x -> arr (\y -> y-1) -< x
+
+g :: (Num b, Arrow a) => a b b
+g = proc x -> (proc y -> returnA -< y-1) -< x