This seems useful to me. We could add it to StripFieldNames but then the name doesn't indicate that you can also get the names as well as strip them.
class GetFieldNames (ts :: [(Symbol, Type)]) where
getNames :: Rec ElField ts -> [String]
instance GetFieldNames '[] where
getNames _ = []
instance (KnownSymbol s, GetFieldNames ts) => GetFieldNames ('(s, t) ': ts) where
getNames _ = symbolVal (Proxy :: Proxy s) : getNames (undefined :: Rec ElField ts)
This seems useful to me. We could add it to
StripFieldNamesbut then the name doesn't indicate that you can also get the names as well as strip them.