Skip to content

Consider adding specific parsing #153

Open
@GregorySchwartz

Description

@GregorySchwartz

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions