testsuite: Assert that testsuite ways are known
[ghc.git] / testsuite / tests / typecheck / should_compile / T9939.hs
1 {-# LANGUAGE GADTs #-}
2 {-# OPTIONS_GHC -Wredundant-constraints #-}
3
4 module T9939 where
5
6 f1 :: (Eq a, Ord a) => a -> a -> Bool
7 -- Eq a redundant
8 f1 x y = (x == y) && (x > y)
9
10 f2 :: (Eq a, Ord a) => a -> a -> Bool
11 -- Ord a redundant, but Eq a is reported
12 f2 x y = (x == y)
13
14 f3 :: (Eq a, a ~ b, Eq b) => a -> b -> Bool
15 -- Eq b redundant
16 f3 x y = x==y
17
18 data Equal a b where
19 EQUAL :: Equal a a
20
21 f4 :: (Eq a, Eq b) => a -> b -> Equal a b -> Bool
22 -- Eq b redundant
23 f4 x y EQUAL = y==y
24