summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/should_compile/arrowrec1.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/arrows/should_compile/arrowrec1.hs')
-rw-r--r--testsuite/tests/arrows/should_compile/arrowrec1.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/should_compile/arrowrec1.hs b/testsuite/tests/arrows/should_compile/arrowrec1.hs
new file mode 100644
index 0000000000..57b6de783c
--- /dev/null
+++ b/testsuite/tests/arrows/should_compile/arrowrec1.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE Arrows #-}
+
+module ShouldCompile where
+
+import Control.Arrow
+import Data.Char
+
+f :: ArrowLoop a => a Char Int
+f = proc x -> do
+ a <- returnA -< ord x
+ rec b <- returnA -< ord c - ord x
+ c <- returnA -< chr a
+ returnA -< b + ord c