summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_compile/ds051.hs
blob: 70c51a792fa94452e4df47fcc14af2545b4d6e15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
module ShouldCompile where

-- !!! test the overlapping patterns detection.

-- f1 overlaps
f1 "ab" = []
f1 "ab" = []
f1 _ = []

-- f2 overlaps
f2 "ab" = []
f2 ('a':'b':[]) = []
f2 _ = []

-- f3 overlaps
f3 ('a':'b':[]) = []
f3 "ab" = []
f3 _ = []

-- f4 doesn't overlap
f4 "ab" = []
f4 ('a':'b':'c':[]) = []
f4 _ = []

-- f5 doesn't overlap
f5 ('a':'b':'c':[]) = []
f5 "ab" = []
f5 _ = []

-- f6 doesn't overlap
f6 "ab" = []
f6 ('a':[]) = []
f6 _ = []