{-# LANGUAGE TypeFamilies #-} type family Elem c type family Elem' c :: * -- type family Elem'' :: * -> * type instance Elem [Int] = Int type instance Elem String = Char foo :: [Int] -> Elem [Int] foo [] = undefined foo (x:xs) = x