summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/should_compile/arrowpat.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/arrows/should_compile/arrowpat.hs')
-rw-r--r--testsuite/tests/arrows/should_compile/arrowpat.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/should_compile/arrowpat.hs b/testsuite/tests/arrows/should_compile/arrowpat.hs
new file mode 100644
index 0000000000..56b1117e9a
--- /dev/null
+++ b/testsuite/tests/arrows/should_compile/arrowpat.hs
@@ -0,0 +1,23 @@
+{-# OPTIONS -XArrows #-}
+
+-- Test for Trac #1662
+
+module Arrow where
+
+import Control.Arrow
+
+expr' :: Arrow a => a Int Int
+expr' = error "urk"
+
+term :: Arrow a => a () Int
+term = error "urk"
+
+expr1 :: Arrow a => a () Int
+expr1 = proc () -> do
+ x <- term -< ()
+ expr' -< x
+
+expr2 :: Arrow a => a () Int
+expr2 = proc y -> do
+ x <- term -< y
+ expr' -< x