summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_compile/read011.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/parser/should_compile/read011.hs')
-rw-r--r--testsuite/tests/parser/should_compile/read011.hs24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_compile/read011.hs b/testsuite/tests/parser/should_compile/read011.hs
new file mode 100644
index 0000000000..7e20d468f0
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/read011.hs
@@ -0,0 +1,24 @@
+-- !!! do & where interaction
+module ShouldCompile where
+
+f1 :: IO a -> IO [a]
+f1 x = do
+ v <- x
+ return [v]
+ where
+ g x = [x,x]
+
+f2 :: IO a -> IO [a]
+f2 x = do
+ v <- x
+ return (g v)
+ where
+ g x = [x,x]
+
+f3 :: IO a -> IO [a]
+f3 x = do
+ v <- x
+ return (g v)
+ where
+ g x = [x,x]
+