summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_run/dsrun020.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deSugar/should_run/dsrun020.hs')
-rw-r--r--testsuite/tests/deSugar/should_run/dsrun020.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_run/dsrun020.hs b/testsuite/tests/deSugar/should_run/dsrun020.hs
new file mode 100644
index 0000000000..6d26dc5607
--- /dev/null
+++ b/testsuite/tests/deSugar/should_run/dsrun020.hs
@@ -0,0 +1,14 @@
+-- Tests transform WITH a by clause
+
+{-# OPTIONS_GHC -XTransformListComp #-}
+
+module Main where
+
+import Data.List(takeWhile)
+
+main = putStrLn (show output)
+ where
+ output = [ (x * 10) + y
+ | x <- [1..4]
+ , y <- [1..4]
+ , then takeWhile by (x + y) < 4] \ No newline at end of file