1 -- !!! ds020 -- lazy patterns (in detail)
3 module ShouldCompile where
11 c ~x ~ _ ~11111 ~3.14159265 = x
24 -- pattern bindings (implicitly lazy)
26 ([],[],[]) = ([],[],[])
27 (~[],~[],~[]) = ([],[],[])
32 (x2 : xs2: ys2) | eq2 = []
37 eq2 = (2::Int) == (4::Int)
38 eq3 = (3::Int) == (3::Int)
39 eq4 = (4::Int) == (2::Int)
41 (x3,y3) | x3 > 3 = (4, 5)
43 -- above: x & y should both be \bottom.
45 (x4,(y4,(z4,a4))) | eq2 = ('a',('a',('a','a')))
46 | eq3 = ('b',('b',('b','b')))
47 | eq4 = ('c',('c',('c','c')))
48 | True = ('d',('d',('d','d')))
50 eq2 = (2::Int) == (4::Int)
51 eq3 = (3::Int) == (3::Int)
52 eq4 = (4::Int) == (2::Int)