Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modify tests, mostly adding -XTranformListComp

  • Loading branch information...
commit 6b80a5b033265ed0f07c6d79bac0e48daa4e3224 1 parent e560a17
@simonpj simonpj authored
Showing with 55 additions and 55 deletions.
  1. +22 −22 tests/ghc-regress/deSugar/should_run/dsrun021.hs
  2. +1 −1  tests/ghc-regress/deSugar/should_run/mc01.hs
  3. +2 −2 tests/ghc-regress/deSugar/should_run/mc02.hs
  4. +1 −1  tests/ghc-regress/deSugar/should_run/mc03.hs
  5. +1 −1  tests/ghc-regress/deSugar/should_run/mc05.hs
  6. +1 −1  tests/ghc-regress/deSugar/should_run/mc06.hs
  7. +1 −1  tests/ghc-regress/deSugar/should_run/mc07.hs
  8. +1 −1  tests/ghc-regress/deSugar/should_run/mc08.hs
  9. +1 −1  tests/ghc-regress/parser/should_compile/mc15.hs
  10. +1 −1  tests/ghc-regress/parser/should_compile/mc16.hs
  11. +1 −1  tests/ghc-regress/rename/should_compile/mc09.hs
  12. +1 −1  tests/ghc-regress/rename/should_compile/mc10.hs
  13. +1 −1  tests/ghc-regress/rename/should_compile/mc11.hs
  14. +2 −2 tests/ghc-regress/rename/should_compile/mc12.hs
  15. +8 −8 tests/ghc-regress/rename/should_compile/rn040.hs
  16. +1 −1  tests/ghc-regress/rename/should_fail/mc13.hs
  17. +1 −1  tests/ghc-regress/rename/should_fail/mc14.hs
  18. +1 −1  tests/ghc-regress/typecheck/should_compile/mc18.hs
  19. +1 −1  tests/ghc-regress/typecheck/should_fail/mc19.hs
  20. +1 −1  tests/ghc-regress/typecheck/should_fail/mc20.hs
  21. +1 −1  tests/ghc-regress/typecheck/should_fail/mc21.hs
  22. +1 −1  tests/ghc-regress/typecheck/should_fail/mc22.hs
  23. +1 −1  tests/ghc-regress/typecheck/should_fail/mc23.hs
  24. +1 −1  tests/ghc-regress/typecheck/should_fail/mc24.hs
  25. +1 −1  tests/ghc-regress/typecheck/should_fail/mc25.hs
View
44 tests/ghc-regress/deSugar/should_run/dsrun021.hs
@@ -1,23 +1,23 @@
--- Transformation stress test
-
-{-# OPTIONS_GHC -XTransformListComp #-}
-
-module Main where
-
-import Data.List(takeWhile)
-import GHC.Exts(sortWith)
-
-employees = [ ("Simon", "MS", 80)
- , ("Erik", "MS", 100)
- , ("Phil", "Ed", 40)
- , ("Gordon", "Ed", 45)
- , ("Paul", "Yale", 60)]
-
-main = putStrLn (show output)
- where
- output = [ (dept, salary)
- | then sortWith by 1
- , (name, dept, salary) <- employees
- , then sortWith by salary
- , then filter by salary > 50
+-- Transformation stress test
+
+{-# OPTIONS_GHC -XTransformListComp #-}
+
+module Main where
+
+import Data.List(takeWhile)
+import GHC.Exts(sortWith)
+
+employees = [ ("Simon", "MS", 80)
+ , ("Erik", "MS", 100)
+ , ("Phil", "Ed", 40)
+ , ("Gordon", "Ed", 45)
+ , ("Paul", "Yale", 60)]
+
+main = putStrLn (show output)
+ where
+ output = [ (dept, salary)
+ | then sortWith by 1
+ , (name, dept, salary) <- employees
+ , then sortWith by salary
+ , then filter by salary > 50
, then take 1 ]
View
2  tests/ghc-regress/deSugar/should_run/mc01.hs
@@ -1,6 +1,6 @@
-- Transformation and grouping stress test
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Main where
View
4 tests/ghc-regress/deSugar/should_run/mc02.hs
@@ -1,6 +1,6 @@
-- Transformation stress test
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Main where
@@ -17,7 +17,7 @@ main = putStrLn (show output)
where
output = [ (dept, salary)
| then sortWith by 1
- , (name, dept, salary) <- employees
+ , (name, dept, salary) <- employees
, then sortWith by salary
, then filter by salary > 50
, then take 1 ]
View
2  tests/ghc-regress/deSugar/should_run/mc03.hs
@@ -1,6 +1,6 @@
-- "Big tuple" stress test for monad comprehensions
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp -XParallelListComp #-}
module Main where
View
2  tests/ghc-regress/deSugar/should_run/mc05.hs
@@ -1,6 +1,6 @@
-- Test transform WITHOUT a by clause
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Main where
View
2  tests/ghc-regress/deSugar/should_run/mc06.hs
@@ -1,6 +1,6 @@
-- Test grouping with both a using and a by clause
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Main where
View
2  tests/ghc-regress/deSugar/should_run/mc07.hs
@@ -1,6 +1,6 @@
-- Tests transform WITH a by clause
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Main where
View
2  tests/ghc-regress/deSugar/should_run/mc08.hs
@@ -1,6 +1,6 @@
-- Tests grouping WITH a by clause but WITHOUT a using clause
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Main where
View
2  tests/ghc-regress/parser/should_compile/mc15.hs
@@ -1,5 +1,5 @@
-{-# LANGUAGE MonadComprehensions #-}
+{-# LANGUAGE MonadComprehensions ParallelListComp #-}
module Foo where
View
2  tests/ghc-regress/parser/should_compile/mc16.hs
@@ -1,4 +1,4 @@
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Foo where
View
2  tests/ghc-regress/rename/should_compile/mc09.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE MonadComprehensions #-}
+{-# LANGUAGE MonadComprehensions, TransformListComp #-}
-- Test performed for TransformListComp and should work for monad comp aswell:
-- GHC 7.0.1 failed because the renamer didn't attach
View
2  tests/ghc-regress/rename/should_compile/mc10.hs
@@ -1,5 +1,5 @@
{-# OPTIONS_GHC -fwarn-unused-matches #-}
-{-# LANGUAGE MonadComprehensions #-}
+{-# LANGUAGE MonadComprehensions, ParallelListComp #-}
-- Test for parallel list comp should work for monad comp aswell:
--
-- GHC 6.4 erroneously reported that the
View
2  tests/ghc-regress/rename/should_compile/mc11.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE RecordWildCards, MonadComprehensions, NamedFieldPuns #-}
+{-# LANGUAGE RecordWildCards, MonadComprehensions, TransformListComp, NamedFieldPuns #-}
module T3901 where
View
4 tests/ghc-regress/rename/should_compile/mc12.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wall #-}
-{-# LANGUAGE MonadComprehensions #-}
--- Test for parallel list comp, which should work for monad comp aswell:
+{-# LANGUAGE MonadComprehensions, ParallelListComp #-}
+-- Test for parallel list comp, which should work for monad comp as well:
--
-- On GHC 6.0 and earlier, this parallel list comprehension generated
-- an incorrect unused-binding warning.
View
16 tests/ghc-regress/rename/should_compile/rn040.hs
@@ -1,8 +1,8 @@
-{-# OPTIONS -fwarn-unused-binds #-}
-module ShouldCompile where
-
--- !!! should produce warnings about unused identifers
-x :: [()]
-x = [ () | y <- [] ]
-
-z = do w <- getContents; return ()
+{-# OPTIONS -fwarn-unused-binds #-}
+module ShouldCompile where
+
+-- !!! should produce warnings about unused identifers
+x :: [()]
+x = [ () | y <- [] ]
+
+z = do w <- getContents; return ()
View
2  tests/ghc-regress/rename/should_fail/mc13.hs
@@ -2,7 +2,7 @@
--
-- Test trying to use a function bound in the list comprehension as the transform function
-{-# OPTIONS_GHC -XRank2Types -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XRank2Types -XMonadComprehensions -XTransformListComp #-}
module RnFail048 where
View
2  tests/ghc-regress/rename/should_fail/mc14.hs
@@ -2,7 +2,7 @@
--
-- Test trying to use a function bound in the list comprehension as the group function
-{-# OPTIONS_GHC -XRank2Types -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XRank2Types -XMonadComprehensions -XTransformListComp #-}
module RnFail049 where
View
2  tests/ghc-regress/typecheck/should_compile/mc18.hs
@@ -1,6 +1,6 @@
-- Checks that the types of the old binder and the binder implicitly introduced by grouping are linked
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldCompile where
View
2  tests/ghc-regress/typecheck/should_fail/mc19.hs
@@ -1,6 +1,6 @@
-- Checks that the correct type is used checking the using clause of the transform
-{-# LANGUAGE MonadComprehensions #-}
+{-# LANGUAGE MonadComprehensions, TransformListComp #-}
module ShouldFail where
View
2  tests/ghc-regress/typecheck/should_fail/mc20.hs
@@ -1,7 +1,7 @@
-- Checks that the ordering constraint on the implicit groupWith is respected
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
View
2  tests/ghc-regress/typecheck/should_fail/mc21.hs
@@ -1,6 +1,6 @@
-- Checks that the correct type is used checking the using clause of the group
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
View
2  tests/ghc-regress/typecheck/should_fail/mc22.hs
@@ -1,7 +1,7 @@
-- Checks that the types of the old binder and the binder
-- implicitly introduced by grouping are linked
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
View
2  tests/ghc-regress/typecheck/should_fail/mc23.hs
@@ -1,6 +1,6 @@
-- Checks that using the "by" clause in a transform requires a function parameter
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
View
2  tests/ghc-regress/typecheck/should_fail/mc24.hs
@@ -1,6 +1,6 @@
-- Checks that the correct type is used checking the using clause of the group when a by clause is present
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
View
2  tests/ghc-regress/typecheck/should_fail/mc25.hs
@@ -1,6 +1,6 @@
-- Checks that using the "by" clause in a transform requires a function parameter
-{-# OPTIONS_GHC -XMonadComprehensions #-}
+{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
Please sign in to comment.
Something went wrong with that request. Please try again.