diff options
Diffstat (limited to 'testsuite/tests/deSugar/should_run/mc02.hs')
-rw-r--r-- | testsuite/tests/deSugar/should_run/mc02.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_run/mc02.hs b/testsuite/tests/deSugar/should_run/mc02.hs new file mode 100644 index 0000000000..77adf26c37 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/mc02.hs @@ -0,0 +1,22 @@ +-- Transformation stress test + +{-# OPTIONS_GHC -XMonadComprehensions -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) + | (name, dept, salary) <- employees + , then sortWith by salary + , then filter by salary > 50 + , then take 1 ] |