summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc058.hs
blob: 1bd10feb930eb8613ddd3db07bb91aabc6e95ba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}

module ShouldSucceed where

class Eq2 a where
 doubleeq :: a -> a -> Bool

class (Eq2 a) => Ord2 a where
 lt :: a -> a -> Bool

instance Eq2 Int where
 doubleeq x y = True

instance Ord2 Int where
 lt x y = True

instance (Eq2 a,Ord2 a) => Eq2 [a] where
 doubleeq xs ys = True

f x y = doubleeq x [1]