diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-11-17 16:01:40 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-11-17 16:01:40 +0000 |
commit | 43e7140a99ca9e1656f546394c5550c43b0450db (patch) | |
tree | a6cfd886e9e9c5ed500d60485b4c93661c851dd2 /testsuite/tests/deSugar | |
parent | ad35781920eb7087b93b28dc89bc12b4a4c9c398 (diff) | |
download | haskell-43e7140a99ca9e1656f546394c5550c43b0450db.tar.gz |
Update test suite following the removal of the default grouping
clause from the SQL-like comprehension notation
Diffstat (limited to 'testsuite/tests/deSugar')
-rw-r--r-- | testsuite/tests/deSugar/should_run/dsrun017.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_run/dsrun022.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_run/mc01.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_run/mc08.hs | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/testsuite/tests/deSugar/should_run/dsrun017.hs b/testsuite/tests/deSugar/should_run/dsrun017.hs index 877db7823c..7a8d16efe5 100644 --- a/testsuite/tests/deSugar/should_run/dsrun017.hs +++ b/testsuite/tests/deSugar/should_run/dsrun017.hs @@ -1,13 +1,13 @@ --- Tests grouping WITH a by clause but WITHOUT a using clause +-- Tests grouping WITH a by clause {-# OPTIONS_GHC -XTransformListComp #-} module Main where -import GHC.Exts(the) +import GHC.Exts(the,groupWith) 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 ]
\ No newline at end of file + , then group by dept using groupWith ]
\ No newline at end of file diff --git a/testsuite/tests/deSugar/should_run/dsrun022.hs b/testsuite/tests/deSugar/should_run/dsrun022.hs index dbbd906ce8..6119675e98 100644 --- a/testsuite/tests/deSugar/should_run/dsrun022.hs +++ b/testsuite/tests/deSugar/should_run/dsrun022.hs @@ -4,7 +4,7 @@ module Main where -import GHC.Exts(sortWith, the) +import GHC.Exts(sortWith, the, groupWith) employees = [ ("Simon", "MS", 80) , ("Erik", "MS", 100) @@ -16,7 +16,7 @@ main = putStrLn (show can_still_use_group_function) >> putStrLn (show output) where output = [ (the dept, map sum salary, (show x) ++ " and " ++ (show y)) | (name, dept, salary) <- employees - , then group by dept + , then group by dept using groupWith , x <- [1, 2, 3] , y <- [4, 5, 6] , then sortWith by sum salary diff --git a/testsuite/tests/deSugar/should_run/mc01.hs b/testsuite/tests/deSugar/should_run/mc01.hs index cf5ca1a0e9..63db170197 100644 --- a/testsuite/tests/deSugar/should_run/mc01.hs +++ b/testsuite/tests/deSugar/should_run/mc01.hs @@ -4,7 +4,7 @@ module Main where -import GHC.Exts(sortWith, the) +import GHC.Exts(sortWith, the, groupWith) employees = [ ("Simon", "MS", 80) , ("Erik", "MS", 100) @@ -16,7 +16,7 @@ main = putStrLn (show can_still_use_group_function) >> putStrLn (show output) where output = [ (the dept, map sum salary, (show x) ++ " and " ++ (show y)) | (name, dept, salary) <- employees - , then group by dept + , then group by dept using groupWith , x <- [1, 2, 3] , y <- [4, 5, 6] , then sortWith by sum salary diff --git a/testsuite/tests/deSugar/should_run/mc08.hs b/testsuite/tests/deSugar/should_run/mc08.hs index 24dd3beb4c..d146bf909f 100644 --- a/testsuite/tests/deSugar/should_run/mc08.hs +++ b/testsuite/tests/deSugar/should_run/mc08.hs @@ -1,13 +1,13 @@ --- Tests grouping WITH a by clause but WITHOUT a using clause +-- Tests grouping WITH a by clause {-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-} module Main where -import GHC.Exts(the) +import GHC.Exts(the, groupWith) 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 ] + , then group by dept using groupWith] |