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

module ShouldCompile 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 ]