class S a where { foo :: a; } class S a => C a where { bar :: a; } instance S Int where { foo = 1; } instance S a => S (List a) where { foo = undefined; } instance C (List Int) where { bar = undefined; }