1 module ShouldFail where
3 -- !!! weird class/instance examples off the haskell list
6 class Foo a where foo :: a -> a
7 class Foo a => Bar a where bar :: a -> a
10 instance Num a => Foo [a] where
12 foo (x:xs) = map (x+) xs
15 instance (Eq a, Show a) => Bar [a] where
17 bar (x:xs) = foo xs where u = x==x
20 ------------------------------------------
23 class Foo a => Bar2 a where bar2 :: a -> a
25 instance (Eq a, Show a) => Foo [a]
27 instance Num a => Bar2 [a]