{-# LANGUAGE TypeFamilyDependencies #-} module M where import Data.Type.Equality type family Bar x = r | r -> x where Bar String = Int Bar Bool = Int Bar () = () -- foo :: forall s t. (Bar s ~ Bar t) => s :~: t -- foo = Refl -- g = foo @String @Int