summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_run/dsrun017.hs
blob: 877db7823cdaf1a97340312af8460322759db49d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- Tests grouping WITH a by clause but WITHOUT a using clause

{-# OPTIONS_GHC -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 ]