70c51a792fa94452e4df47fcc14af2545b4d6e15
[ghc-hetmet.git] / ghc / tests / deSugar / should_compile / ds051.hs
1 module ShouldCompile where
2
3 -- !!! test the overlapping patterns detection.
4
5 -- f1 overlaps
6 f1 "ab" = []
7 f1 "ab" = []
8 f1 _ = []
9
10 -- f2 overlaps
11 f2 "ab" = []
12 f2 ('a':'b':[]) = []
13 f2 _ = []
14
15 -- f3 overlaps
16 f3 ('a':'b':[]) = []
17 f3 "ab" = []
18 f3 _ = []
19
20 -- f4 doesn't overlap
21 f4 "ab" = []
22 f4 ('a':'b':'c':[]) = []
23 f4 _ = []
24
25 -- f5 doesn't overlap
26 f5 ('a':'b':'c':[]) = []
27 f5 "ab" = []
28 f5 _ = []
29
30 -- f6 doesn't overlap
31 f6 "ab" = []
32 f6 ('a':[]) = []
33 f6 _ = []