summaryrefslogtreecommitdiff
path: root/testsuite/tests/pmcheck/complete_sigs/completesig10.hs
blob: 4dbb26fed9b08dccd9577ecf862532fe4c52a5cd (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
{-# OPTIONS_GHC -Wall #-}
module Completesig10 where

-- Multiple competing COMPLETE sigs AHHH!!

data T = A | B | C | D | E

{-# COMPLETE A,B #-}
{-# COMPLETE C,D #-}

-- Completely overlapping
m1 :: T -> ()
m1 A = ()
m1 B = ()
m1 C = ()
m1 D = ()

-- Incomplete overlap
m2 :: T -> ()
m2 B = ()
m2 D = ()

-- Redundant incomplete overlap
m3 :: T -> ()
m3 B = ()
m3 C = ()
m3 D = ()

-- One matches

m4 :: T -> ()
m4 C = ()
m4 D = ()