summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_run/mc08.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deSugar/should_run/mc08.hs')
-rw-r--r--testsuite/tests/deSugar/should_run/mc08.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_run/mc08.hs b/testsuite/tests/deSugar/should_run/mc08.hs
new file mode 100644
index 0000000000..24dd3beb4c
--- /dev/null
+++ b/testsuite/tests/deSugar/should_run/mc08.hs
@@ -0,0 +1,13 @@
+-- Tests grouping WITH a by clause but WITHOUT a using clause
+
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
+
+module Main where
+
+import GHC.Exts(the)
+
+main = putStrLn (show output)
+ where
+ output = [ (the dept, sum salary, name)
+ | (dept, salary, name) <- [("A", 1, "Bob"), ("B", 2, "Fred"), ("A", 5, "Jim"), ("A", 9, "Jim")]
+ , then group by dept ]