Major patch to add -fwarn-redundant-constraints
[ghc.git] / testsuite / tests / typecheck / should_compile / tc079.hs
1 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
2
3 -- !!! small class decl with local polymorphism;
4 -- !!! "easy" to check default methods and such...
5 -- !!! (this is the example given in TcClassDcl)
6 --
7 module ShouldSucceed where
8
9 class Foo a where
10 op1 :: a -> Bool
11 op2 :: Ord b => a -> b -> b -> b
12
13 op1 x = True
14 op2 x y z = if (op1 x) && (y < z) then y else z
15
16 instance Foo Int where {}
17
18 instance Foo a => Foo [a] where {}