purescript-contrib/purescript-string-parsers

many1 should return NonEmptyList

Closed this issue · 3 comments

This makes the image closer to the codomain and is therefore easier and safer to use. Especially useful with the common use case of using foldl1 or foldr1 on the result.

Also the other combinators that parse one or more values - many1Till, sepBy1 etc. I have a prototype implementation - https://github.com/newlandsvalley/purescript-school-of-music/blob/master/src/Data/Euterpea/DSL/ParserExtensions.purs. Does backward compatibility prevent the direct replacement? Incidentally, I couldn't find foldr1 in Pursuit although foldl1 was there.

Fixed by #41 right? Could be closed probably

This was indeed fixed by #41, thanks @justinwoo