data D1 a b = D1C a b; data D2 a b = D2C a b; class C a where { type T a; } instance C (D1 a b) where { type T (D1 a b) = Int; } instance C (D2 a Int) where { type T (D2 a Int) = T (D1 a a); }