Open
Description
In almost every program I use cassava
with, I have this definition:
parse :: [Map.Map T.Text T.Text]
parse xs = either error (V.toList . snd) (CSV.decodeByName xs :: Either String (CSV.Header, V.Vector (Map.Map T.Text T.Text)))
I know "either error" may not be that great, but can there be some convenience functions like csvToMap :: [Map.Map T.Text T.Text]
and the like (for other types) to make the parser have one less point of friction if one doesn't mind an opinionated type?