purescript-contrib/purescript-string-parsers

Implement Foldable, monoid for parser

flip111 opened this issue · 2 comments

Would be nice to be able to fold over a list of parsers.
When using endBy1 a sep where a is a string parser, would be nice to concat the result with fold

I've added a Semigroup instance in #38, which allows for a nicer syntax like parser1 <> parser2 <> parser3

Since we have a Semigroup instance where append = lift2 append, it probably also makes sense to add a Monoid instance with mempty = pure mempty.