:set -XTypeFamilyDependencies :set -XDataKinds :set -XUndecidableInstances :set -XPolyKinds type family F a b c = (result :: k) | result -> a b c type instance F Int Char Bool = Bool type instance F Char Bool Int = Int type instance F Bool Int Char = Char type instance F Bool Int Char = Char type family I (a :: k) b (c :: k) = r | r -> a b type instance I Int Char Bool = Bool type instance I Int Char Int = Bool type instance I Bool Int Int = Int type family J a (b :: k) = r | r -> a type instance J Int b = Char type MaybeSyn a = Maybe a type family K a = r | r -> a type instance K a = MaybeSyn a