1 2 3 4 5 6 7 8 9 10 11
{-# LANGUAGE TypeFamilies #-} module Class3 where class C a where foo :: a -> a instance C () bar :: (a ~ ()) => a -> a bar = foo