summaryrefslogtreecommitdiff
path: root/ghc/compiler/tests/deSugar/ds009.hs
blob: 370b6290db8950b42422261f89f64d76f1b63f04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--!!! ds009 -- simple list comprehensions

module SimpleListComp where

f xs = [ x | x <- xs ]

g xs ys zs = [ (x,y,z) | x <- xs, y <- ys, z <- zs, True ]

h xs ys = [ [x,y] | x <- xs, y <- ys, False ]

i xs = [ x | all@(x,y) <- xs, all == ([],[]) ]

j xs = [ (a,b) | (a,b,c,d) <- xs ]