data D t = D t; class C a where { type T a := D a; bar :: a -> T a; } foo x = case bar x of D y -> y;;