You can use MultiParamTypeClass
and FunctionalDependencies
, though without knowing why you're using it it's hard to say if this is sufficient.
class Project k a | k -> a
instance Project [r] r
> :t undefined :: Project String r => r
undefined :: Project String r => r :: Char